NICE, France — Mallory Swanson scored a pair of goals just moments apart in the first half and the United States opened the Olympics with a 3-0 victory over Zambia on Thursday night, giving new coach Emma Hayes a win in her first major tournament with the team.

Trinity Rodman also scored for the United States, which is looking to add a record fifth gold medal to its Olympic collection.

Swanson is married to former Braves and current Cubs shortstop Dansby Swanson. Rodman is a daughter of former NBA star Dennis Rodman.

Zambia was hurt in the 33rd minute when Pauline Zulu was sent off with a red card and the team was limited to 10 players the rest of the way. Zulu sobbed as she left the field.

Hayes took over the U.S. team in late May after finishing out the season with Chelsea in the Women’s Super League. She shook things up a bit with her roster, leaving star forward Alex Morgan, a veteran of three Olympics, at home.

Hayes is charged with leading the Americans as they seek to distance themselves from the disappointment of last summer’s Women’s World Cup, when they crashed out in the round of 16.

“If you had asked me at the beginning of the game, ‘Would you be happy with a 3-nil win?’ I probably would have said no,” Hayes said. “However, after the performance and the chances created and finding the back of the net we did, I don’t want to be too hard on the girls.”

Rodman, making her Olympic debut, scored in the 17th minute. U.S. captain Lindsey Horan passed to Rodman, who deftly shot around onrushing Zambian goalkeeper Ngambo Musole.

Swanson scored twice within 70 seconds in the 24th and 25th minutes to give the Americans a 3-0 lead in the Group B match in Nice.

Swanson called it just a start.

“I think there’s little things within that game, within the play, that we need to fine-tune, that we can just keep on growing with,” Swanson said. “So I think there’s definitely those little things, and we’ll address them and fix them and keep moving forward.”

U.S. forward Sophia Smith left the game with what appeared to be an ankle injury late in the first half and was replaced by Lynn Williams.

Williams was originally an alternate on Hayes’ Olympic roster, but Catarina Macario wasn’t able to play in France because of minor knee irritation.

It was the first time the United States has faced Zambia on the international stage.

“A lot of credit to Zambia’s goalkeeper tonight, because in the first half I think we had a sequence of like six shots in a row that she saved or went off the post,” Horan said. “And sometimes that how it goes. I was really happy it wasn’t one of those days where the ball just doesn’t go in the back of the net.”

While Zambia started stars Barbra Banda and Racheal Kundananji, neither of them was able to break through the U.S. defense, which was stout throughout the match.

Banda is a proven scorer, with 12 goals in 12 games this season for the Orlando Pride in the National Women’s Soccer League. At the Tokyo Games, she had a pair of back-to-back hat tricks in the group stage.

The United States will next face Germany on Sunday in Marseille.

Canada 2, New Zealand 1

Evelyne Viens scored in the 79th minute to give reigning Olympic champion Canada a victory over New Zealand in a match that was overshadowed by allegations of drone surveillance at the Ferns’ practice.

Viens, who came into the match as a substitute in the 67th, took a long pass from Jessie Fleming and tucked it into the goal at the opposite post 12 minutes after entering.

Mackenzie Barry gave New Zealand the early lead with a goal in the 13th minute, but Cloe Lacasse equalized for Canada in first-half stoppage time.

The Group A match in Saint-Etienne was controversial before the start when two Canada staffers were sent home early for their alleged involvement with drones that were reported over a pair of New Zealand’s practices.

Canada played the opener without coach Bev Priestman, who stepped away from the team for the match to show accountability. However, she was adamant at practice Wednesday that she had no knowledge of the drone use.

FIFA has opened a disciplinary inquiry into the matter, and Canadian Soccer launched an independent review.

The drone scandal marred the tournament’s start. Canada won bronze medals in both the 2012 and 2016 Olympics before winning a gold in Tokyo.

Spain 2, Japan 1

World champion Spain came from behind to beat Japan in Group C thanks to a goal and an assist from Ballon d’Or winner Aitana Bonmati.

Playing in its first Olympics, Spain fell behind at La Beaujoire Stadium in Nantes after Aoba Fumino’s brilliant long range free kick flew into the top corner in the 13th.

Spain might have had flashbacks to its 4-0 loss to Japan at last year’s World Cup, but Bonmati — who has dominated the individual awards in women’s soccer over the past 12 months — leveled the game nine minutes later when rounding goalkeeper Ayaka Yamashita.

She provided the assist for Mariona Caldentey to score the winner in the 74th with a curling shot into the bottom corner.

Germany 3, Australia 0

After its humbling group-stage exit from the Women’s World Cup last year, Germany got off to a flying start at the Olympics by beating Australia in Marseille.

Marina Hegering and Lea Schueller scored headers from corners in either half and Jule Brand fired in a third for the No. 4-ranked Germans from close range.

World Cup semifinalist Australia lacked firepower without talismanic striker Sam Kerr, who is recovering from ACL damage.

Hegering’s far post header gave Germany the lead in the 24th and Schueller rose highest to convert a second in the 64th.

Brand had a simple finish from close range after Sarai Linder’s low cross to the far post in the 68th.

Brazil 1, Nigeria 0

Gabi Nunes scored in the 37th minute and Brazil went on to defeat Nigeria in Group C in Bordeaux.

Marta, a six-time world player of the year, started for Brazil in her sixth Olympics. The 38-year-old captain has said this will be her last major tournament with the national team.

Brazil’s players were looking to send Marta off with a title in a major championship, something that has eluded her. Brazil has never won a gold medal in the Olympics but claimed silver in 2004 and 2008.

France 3, Colombia 2

France built a 3-0 lead in the first half and held off Colombia in Lyon.

Marie-Antoinette Katoto scored a pair of goals and Kenza Dali added another for the hosts in Group A.

Catalina Usme converted on a penalty early in the second half for Colombia, which was returning to the Olympics after missing out on the Tokyo Games. Manuela Pavi helped close the gap further with another goal in the 64th.