American Megan Rapinoe maintains control under pressure from Sweden’s Jessica Samuelsson in Albufeira, Portugal. (By Raquel Costa — EPA)

The U.S. women’s national team suffered its first defeat in two years Friday, a 1-0 loss to Sweden at the Algarve Cup that ended its unbeaten streak at 43. The Americans (0-1-1) dropped out of championship contention after winning eight of the previous 11 titles at the annual tournament in Portugal.

Their previous defeat came at the Algarve, 1-0 to Japan in March 2012. Since then, the United States had recorded a 36-0-7 record, eight games short of the program’s undefeated milestone set between 2004 and ’07 (43-0-8).

Swedish star Lotta Schelin scored on a header midway through the first half and the U.S. team missed numerous opportunities throughout the afternoon.

The loss came two days after a 1-1 draw with Japan. The last time the Americans had gone two consecutive matches without winning was with a pair of draws with Germany in October 2012.

They will close the group stage in Portugal on Monday against Denmark before playing in a placement match Wednesday.

Another long unbeaten streak — 80 straight at home since November 2004 — will be put to the test next month with two matches against China: April 6 in Commerce City, Colo., and April 10 in San Diego.

USA LINEUP

Solo; Krieger, Rampone, Sauerbrunn, Klingenberg (O’Hara 46th); O’Reilly, Brian (S. Mewis 68th), Lloyd, Rapinoe (K. Mewis 68th); Rodriguez (Press 70th), Wambach (Hagen 81st).

(Leroux missed the match with an illness.)