LONDON (AP) — Tomas Berdych had enough energy left after a record-setting doubles match to put defending champion Czech Republic into the quarterfinals of the Davis Cup on Sunday, while Italy beat Croatia in the decisive singles match to also advance from the first round.

Spain, however, will not have a chance to win a sixth title after its short-handed team lost to Canada, which reached the quarterfinals for the first time.

Berdych returned to the court after he and Lukas Rosol won an epic 7-hour match on Saturday — the longest in the history of the Davis Cup — and needed just over three hours this time to beat Stanislas Wawrinka 6-3, 6-4, 3-6, 7-6 (5) and give the Czechs an insurmountable 3-1 lead.

"I was feeling good from the first point and was quite ready for a fifth set," Berdych said. "I played him (Wawrinka) many times and actually he's not one of the opponents I like to play because he has a dangerous game. But for myself, I have to say, that was my best match with him and I'm very happy with that."

The win for the Czechs set up a quarterfinal against Kazakhstan, which ousted Austria after Andrey Golubev beat Jurgen Melzer 4-6, 6-3, 6-4, 6-2 in the first reverse singles for a 3-1 lead.

Italy advanced after Fabio Fognini won the fifth and decisive match in front of the home crowd, beating beat Ivan Dodig 4-6, 6-4, 6-4, 6-4 to give Italy a 3-2 win over Croatia and send his country to the quarterfinals for the first time in 15 years.

"It was a crazy victory, but everyone always says I'm crazy," Fognini said. "I'm extremely, extremely happy, because it was a great match, and also because it was for Italy and everything's different and more emotional. It wasn't just my victory, it was Italy's victory."

Italy will play Canada, after 15th-ranked Milos Raonic defeated No. 82 Guillermo Garcia-Lopez of Spain 6-3, 6-4, 6-2 in the opening reverse singles match to give his country a 3-1 lead.

Five-time champion Spain was missing Rafael Nadal, David Ferrer and Nicolas Almagro because of injuries and fatigue, and Canada had taken a 2-0 lead in Friday's singles before losing the doubles.

The United States progressed with a hard-fought 3-2 win over Brazil.

Brazil's Thomaz Bellucci fought back to beat John Isner 2-6, 6-4, 6-7 (7), 6-4, 6-3 and force the tie into a decisive fifth rubber before Sam Querrey clinched it for the hosts with a 4-6, 6-3, 6-4, 7-6 (3).

"I fought through the tough points and got breaks in the second, third and fourth sets. I was just happy to get through it," Querrey said.

The U.S. will host Serbia in the next round after the Serbs beat Belgium 3-2. Argentina completed a 5-0 rout of Germany and France swept Israel by the same score.