Updated

FRISCO, Texas --

United States women's national team captain and reigning FIFA Women's World Player of the Year Carli Lloyd collected a rebound off her penalty kick that had been blocked by Mexico goalkeeper Cecilia Santiago, and knocked in the game-winner in the 80th minute.

It was a huge sigh of relief for Lloyd and the U.S., who will advance to the semifinals of this CONCACAF Olympic Qualifying Championship after their 1-0 win over El Tri at Toyota Stadium. But it was close, as the high-flying start to this Olympic qualifying effort hit a speed bump against Mexico, who will now battle Costa Rica for the second-place finish in Group A play and the right to play in the semifinals, too.

The late-game goal by Lloyd was enough -- but barely. Her penalty kick came on an alleged handball by Mexico. It was a gift to the Americans at a critical moment, especially given the exemplary way in which El Tri held their ground in coach Leonardo Cuellar's plan.

The U.S. also relied on goalkeeper Hope Solo in the 86th minute, when El Tri midfielder Monica Ocampo let fly a soaring shot that was on target -- until Solo's fingertips pushed the ball over the top of the net. Solo had another puck in the 88th minute as Mexico refused to go gently into defeat.

The game was markedly different from the 5-0 opener of this 2016 tournament that will see the top two CONCACAF teams go through and earn a berth in the 2016 Rio Olympics. Against Mexico, U.S. coach Jill Ellis used few substitutions as the U.S. women spent the afternoon out-shooting Mexico in a match that was pretty key to setting up the Americans' immediate and long-term prospects.

Mexico dropped five defenders back, unwilling to let the U.S. get off to the same lightning fast start as they did against Costa Rica, when Alex Morgan scored the opening goal just 12 seconds into the match. The set play off the kickoff rattled not just the Costa Rica defense, but the entire team. Las Ticas never recovered and the U.S. reeled off a 5-0 victory. For Mexico, that meant coming out in a 5-4-1 that made it challenging for the U.S. to find or create space.

On that note, the U.S. had to try and break through with lower-percentage attempts. Julie Johnston attempted a high-kick off a pass and Crystal Dunn took a shot from outside the right side of the box, anything to put some pressure on El Tri goalkeeper Cecilia Santiago.

Lindsey Horan looked to continue to make her mark as the team's new holding midfielder. The natural forward touched the ball on almost every possession in the first half and did a good job dropping back and moving forward as she linked the back line and the attack. However, the aggressive nature of the Mexico game plan seemed to wear on the 21-year-old. She was tripped several times, left to clutch her knees and favor her ankle. It was a rough day for the Colorado native, who took the brunt of Mexico's aggressive defense, along with Lloyd.

On the other side of the ball, Mexico was clearly sent out with a game plan to keep Lloyd from having any space. Lloyd was manhandled in front of the goal several times, including once after a corner kick 25 minutes in. However, no amount of protest from the U.S. captain could draw a penalty for the aggressive work against her. The U.S. was forced to be patient, as Leonardo Cuellar's game plan took the wind out of the U.S. attack. But the tactics paid off when Tobin Heath drew a yellow card in the 34th minute.

With the U.S. and Mexico in a scoreless tie at the half, the only change Ellis made was substituting Christen Press for Dunn. It was not a magic bullet. Mexico continued to pressure the U.S., tackling and interrupting every attempt the U.S. made to create a play. Press almost had a repeat of the nifty goal she scored against Costa Rica in the opener.

In the 63rd minute, Press collected a pass in front of the goal by again controlling the ball down with a backward flick of her foot. She had the ball at her foot and left go a shot, but was stymied before she could follow through. Morgan Brian tried to collect the rebound, but her shot was off the market. The large crowd was kept at the edge of their seats, waiting for the U.S. to connect, especially when Alex Morgan narrowly missed two more attempts from right in front of the goal.

With a 20-person roster for this CONCACAF Olympic Qualifying Championship, the rotation and options are much tighter than they were for the U.S. during the 2015 Women's World Cup, where 23 players were on board. By the time the U.S. gets to Rio -- should they qualify as expected -- they will be limited to 18 players, so this tight test against Mexico and whatever else is ahead in the semifinals are a sign of things to come.

"I think my team was very disciplined and stuck with the plan," Mexico manager Cuellar said after his team's loss. "We were hoping to grow with the game and get opportunities, but I am very proud of my team, very proud of the effort and proud of their discipline and very proud of how the defend the colors of our country. I feel that this is one of the games that will benefit us in the long run but now we have to recover about the way we lost today and concentrate on the next match."