Great Britain narrowly missed out on qualification for Fed Cup World Group II after losing the deciding set of their tie with Japan in Miki.
Johanna Konta beat Naomi Osaka 6-3 6-3 to move GB to within one win of promotion but Heather Watson was beaten 7-6 (9/7) 6-4 by Kurumi Nara as Japan levelled the tie.
Konta and Watson then joined forces in the doubles and looked set to lead Britain to glory when they won the first set, but Japanese pair Miyu Kato and Makoto Ninomiya rallied for a 3-6 6-3 6-3 victory to send Japan, and not Britain, up.
Czech Republic beat U.S. to clinch sixth Fed Cup in eight years
Watson and Konta started slowly as the Japanese duo reeled off five points in a row to break the Konta serve in the opening game and then held their own serve to love to move 2-0 ahead.
However, Konta and Watson rallied to win five games in a row and take control of the set, establishing a 5-2 lead.
Kato and Ninomiya stopped the rot to get it back to 5-3 but Konta held to 15 to close out the set.
Japan hit the ground running in the second set and raced into a 5-0 lead before recovering from a brief wobble to take the tie into the decider.
Kato and Ninomiya broke the British pair in the second set to take a 2-0 lead before saving four break points to move into a position of authority at 3-0.
They reeled off four points in a row and then saved another break point to make it 5-0.
Britain finally got on the board in the set when Konta held in a relatively straightforward service game before taking confidence from that and immediately breaking the Japanese duo for 5-2.
They then held again after faltering slightly to slip from 30-0 to 30-40 but Kato and Ninomiya finally closed out the set on their third set point to send the match to its nailbiting conclusion.
Konta recovered from 0-40 down to hold serve in the fifth game but the writing was on the wall and the Japan pair did get the vital break on the Watson serve to move into a 4-3 lead.
They served out for 5-3 and even though Watson and Konta saved two match points, they could not save a third as Kato and Ninomiya closed out a 3-6 6-3 6-3 win.
Earlier, Konta completed her second straight-sets victory of the tie with the win over Osaka.
The British number one broke the Japanese world number 22 in the seventh game before reeling off four games in a row to win the opening set 6-3.
Konta saved two break points in the fifth game of the second set before breaking for a 4-2 lead.
She then completed the victory on her second match point in an hour and 15 minutes.
Watson then had the opportunity to secure the tie for GB.
But after a back-and-forth opening set that saw six breaks of serve, Nara took it 9-7 in the tie-break before a Watson forehand into the net saw her close out a 7-6 6-4 victory.
U.S. name unfamiliar lineup for Fed Cup final
Kvitova outplays Kerber to send Czechs into Fed Cup final