Megan Rapinoe scored her 58th international goal. (Reinhold Matay-USA TODAY Sports)

STOCKHOLM, Sweden – A questionable call helped the U.S. women’s national team stave off defeat and keep its unbeaten streak alive Saturday.

The Americans were awarded a penalty kick on a foul on defender Kelley O’Hara that appeared to have happened just outside the area.

Megan Rapinoe fired home the ensuing spot kick in the 87th minute to lift the USA into a 1-1 draw with Sweden in an international friendly between two of the world’s top-five ranked teams on Saturday evening at an empty Friends Arena.

The USWNT chased the game for a good portion of the match. No one needed to remind head coach Vlatko Andonovski that if the team performed like that at the Olympics, it could be another disappointing showing.

If we play the way we played today, it’s not good enough,” he said, adding that he “wasn’t happy” with the players’ “cleanness of touch.”

“They made way too many mistakes.”

Rapinoe said the USA was “very sloppy.”

Sweden, a well-organized side and a long-time USA nemesis, made life difficult for the visitors.

“The games that we’ve played, up until this point, we’ve pretty much been able to play the way that we want,” Rapinoe said. “Things have looked pretty spot-on to what Vlatko and the staff have prepared us for.”

Rapinoe called the Swedes, “a great challenge … This is exactly what we need.”

The match not only extended the USA’s undefeated streak to 38 games, but also marked the 300th career cap for forward Carli Lloyd, who became just the third player – woman or man – in the history of international soccer to reach the milestone. Lloyd joins former USWNT teammates Kristine Lilly (354) and Christie Pearce Rampone (311) in the 300 Cap Club.

Entering the match with a 5-0-0 mark in 2021, the top-ranked USWNT knew from the beginning of the match that the fifth-ranked Swedes would prove a tough test as the home side pressured the Americans across the field. While the Americans outshoot Sweden, 20-9 and 6-2 in shots on goal, the hosts were extremely organized on defense and dangerous on transition via some of Europe’s best forwards.

“They’re a tough team,” Andonovski said. “That’s why we came here. To play this team, to get exposed to physicality, to tactics and sophistication like this, so we can prepare to be the best version that we can be going into Olympics.”

Lloyd nearly opened the scoring after 20 minutes on a header off a cross from Julie Ertz that sailed high. Perhaps the best chance came minutes later when a driven shot from Rose Lavelle forced a quality diving save by goalkeeper Jennifer Faulk. Lloyd then again went close on a shot from left that skipped wide just past the far post.

The Swedes grabbed the lead past the half-hour mark on a set piece as towering forward Lina Hurtig rose high to head in a corner kick from Kosovare Asllani, marking the first goal the USA has allowed since March 12, 2019 (against Japan), and ending a run of six consecutive clean sheets. It was also the first goal scored on goalkeeper Alyssa Naeher in 10 matches.

Naeher came up huge just before the break, denying forward Fridolina Rolfo on a one-on-one opportunity that came from a USA give-away.

The USA was fortunate not to concede a second some 10 minutes into the second half when forward Sofia Jakobsson was sprung free down the center. Naeher came off her line, closed the angle and forced Jakobson wide left. Her cross with an empty net was misplayed by another Swedish attacker near the six-yard box and the USA cleared.

The Americans created several solid chances throughout the final 45 minutes, firing 13 shots to Sweden’s three. Falk, however, was up for the challenge, denying a point-blank header from Lloyd, making a diving save on a Lavelle shot through traffic and stone-walling Rapinoe’s near-post shot from seven yards.

Rapinoe, who came on in the 57th minute, got the last say, burying a penalty kick with three minutes left for her team-leading sixth goal of the year after O’Hara was taken down on the right edge of the penalty area.

“We don’t have [VAR], so I’ll take it,” Rapinoe said. “I’m not asking any questions.”

The goal was Rapinoe’s 58th of her career, moving her to within two of tying Shannon MacMillan and Christen Press for ninth on the all-time list.

The USA created a few excellent chances at the end, the best ones coming through substitute Kristie Mewis, but her shot from just outside the six-yard box was blocked and then another shot after a scramble from close range went just wide right. While the draw ended the USA’s – and head coached Vlatko Andonovski’s, 16-game winning streak – it kept alive the team’s undefeated streak. The USA is 34-0-4 since its last defeat in January 2019 against France. The 16-game winning streak was the third-longest in USWNT history.

The USA will close out its two-game European trip when it travels to Le Havre to take on third-ranked France Tuesday at 3 p.m. (ESPN2).