AP photo by John Bazemore / Atlanta Braves starter Max Fried pitches in the second game of Wednesday's doubleheader against the visiting New York Yankees.

ATLANTA — The Atlanta Braves have renewed hopes their starting pitching can carry them through the second half of this shortened Major League Baseball season.

The New York Yankees have renewed worries that injuries will be a concern all season long.

Freddie Freeman hit a two-run homer in the sixth inning off Chad Green as the Braves, led by another strong start from Max Fried, rallied to beat the Yankees 2-1 on Wednesday night and sweep a doubleheader of seven-inning games.

The Yankees have lost five straight. The second game of the twinbill was New York outfielder Aaron Judge's first since being activated from the injured list, and the star slugger left in the middle of the sixth inning after aggravating his strained right calf.

"Obviously he's very frustrated," Yankees manager Aaron Boone said.

Boone said Judge's calf "tightened up again" while running to second base after his fourth-inning single. He said Judge will be evaluated Thursday.

"It doesn't seem to be overly serious, but enough that we needed to get him out of there," Boone said.

In the opener, Atlanta pitching prospect Ian Anderson dazzled in his Major League Baseball debut, holding the Yankees hitless into the sixth inning and ending Gerrit Cole's 20-game winning streak as the Braves won 5-1.

Masahiro Tanaka was dominant in the second game for New York, allowing only three hits in five scoreless innings as he left with a 1-0 lead. Green (2-1) allowed an infield single to Dansby Swanson with two outs in the sixth before giving up Freeman's homer, an opposite-field shot over the 385-foot mark in left field.

Fried (5-0) allowed four hits and one run in six strong innings. Mark Melancon pitched the seventh for his fifth save this season.

The Yankees scored their only run off Fried in the fifth. Miguel Andujar singled to left, moved to third on a double down the third-base line by Erik Kratz and scored on Tyler Wade's fly to left field.

Fried had the only wins by a regular Braves starter this year before Anderson's impressive outing.

Atlanta outfielder Ronald Acuña Jr. celebrated his return to the lineup by leading off the opener with a 473-foot drive against Cole.

Anderson (1-0) gave a depleted Atlanta rotation a huge boost. The 22-year-old right-hander, the third overall pick in the 2016 draft, didn't allow a hit until Luke Voit connected for his team-leading 11th homer with one out in the sixth.

That was the only hit Anderson allowed in six innings. He struck out six and walked two. Anderson opened the game with two strikes to Mike Tauchman and never seemed rattled.

"Early on definitely there were some nerves going, but I think it was a good nervousness and excitement to prove myself a little bit," Anderson said.

Anderson was promoted to the majors on Tuesday before his scheduled debut was postponed because of rain. He showed up with a new beard that surprised manager Brian Snitker.

"I didn't recognize him," Snitker said. "When he came in the office with a mask on, I didn't know who the hell he was."

Dansby Swanson and Marcell Ozuna also homered off Cole (4-1), who took his first loss in the regular season since May 22, 2019, with the Houston Astros.

"It seemed to be a little bit feast or famine in terms of good command for a period of time, and then some bad command in some bad spots," Cole said.

Cole was trying to become the first American League pitcher to win 21 straight regular-season decisions. The all-time record is 24 by Carl Hubbell, followed by Roy Face (22) and Cole, Jake Arrieta, Roger Clemens and Rube Marquard tied at 20.

Cole had been unbeaten in 28 consecutive regular-season starts. Clemens holds the mark with 30. Cole's only loss in 15 months had come in the World Series opener last year with Houston against the Washington Nationals.

He gave up five runs on five hits with nine strikeouts in five-plus innings Wednesday.

"A couple of pitches back, and it's very much a dominant, Gerrit outing," Boone said.

Cole was lifted after giving up a double to Freeman and a walk to Ozuna with no outs in the sixth. Nick Markakis hit an RBI double off Luis Cessa.

Acuña pulled a 97 mph fastball into the left-field seats to open the first. It was Acuña's longest homer and the longest by any Braves batter at Truist Park, which opened in 2017.

Anderson felt like a fan watching Acuña's long homer.

"That's just fun to watch," Anderson said. "I couldn't believe ... even still now in disbelief how far he hit that and in a big spot against Cole. He's a great player."

Swanson hit a two-run homer after Cole walked Acuña in the third inning. With two outs in the inning, Ozuna crushed his eighth homer 469 feet to left-center.

The Yankees were playing their first of three doubleheaders in five days. They play twinbills at Yankee Stadium against the New York Mets on Friday and Sunday. The Mets will be the designated home team in the second game of each doubleheader, with the Yankees hitting first, as they are makeup games originally planned for the Mets' Citi Field.

Atlanta is off on Thursday beore opening a three-game series at Philadelphia on Friday night.