BELO HORIZONTE, Brazil — After Ecuador and Japan couldn't find their way to victory, Paraguay was the team celebrating.

Ecuador and Japan were eliminated from the Copa America after a 1-1 draw on Monday, automatically giving Paraguay a spot in the quarterfinals of the South American competition.

Paraguay could only cheer after losing to Colombia in Group B on Sunday, but it got the result it needed to advance as one of the top two third-place finishers.

Uruguay won Group C after beating second-place Chile 1-0 in Rio de Janeiro on Monday. It ended with seven points, one more than two-time defending champion Chile. Guest Japan finished with two points and Ecuador with one. The other third-place team to advance was Peru, which finished with four points in Group A.

"Japan is often underestimated," Ecuador coach Hernán Darío Gómez said. "It's a well-organized and very dynamic team. Our players tried their best. It wasn't their fault."

The quarterfinals will feature Brazil-Paraguay, Venezuela-Argentina, Colombia-Chile and Uruguay-Peru.

"Football is improving in Japan and in Asia in general," said Japan coach Hajime Moriyasu, who brought to Brazil a young squad focused on the Olympic tournament at home next year. "We played well, had some good matches against some strong nations."

It was an open match in front of a crowd of just 7,623 at the Mineirao Stadium, with only a victory suffice for both teams' hopes to progress to the quarterfinals.

Japan opened the scoring in the 15th minute with a goal initially disallowed for offside but later confirmed by video review. Ecuador goalkeeper Alexander Dominguez couldn't fully clear a deep pass into the area and Shoya Nakajima picked up the loose ball and lobbed a shot into the open net.

The goal had been called off because Shinji Okazaki appeared to be offside when he made a run into the area.

Ecuador equalized in the 35th with a close-range shot by Angel Mena. Japan goalkeeper Eiji Kawashima made a great one-handed save after a shot by Robert Arboleda, but Mena picked up the rebound and easily found the net.

Japan forward Daizen Maeda had a great chance to break the deadlock near the end of the match, but his shot from inside the area was stopped Dominguez's boot.

In stoppage time, Ayrton Preciado narrowly missed for Ecuador, and Japanese teenager Takefusa Kubo had a goal disallowed for offside just before the final whistle.

Kubo, an 18-year-old forward signed by Real Madrid for its "B'' team, was one of the many youngsters Japan brought to Brazil to prepare for the Olympic tournament.

"Our players have a lot to learn," Moriyasu said. "They have to understand that they can help improve our football."

Japan last played in the Copa America as a guest in 1999, when it also was eliminated in the group stage.

Ecuador has won only two of its 18 matches in the Copa America since 2004. It lost to Uruguay and Chile in its other matches this year. Japan's youngsters lost to Chile and drew with Uruguay.

___

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports