Two weeks after the Braves traded Jason Heyward and two days after team officials flew to Maryland to woo potential replacement Nick Markakis, they got their man Wednesday.

The Braves signed Markakis, a veteran right fielder and Woodstock High graduate, to a four-year contract worth about $44 million.

“We have added a winning player on the field, in the clubhouse, and in the community,” said John Hart, Braves president of baseball operations, who continues to reshape the roster in a transitional period for the franchise.

The Braves are making moves with the intention of being a title contender when they move to their new ballpark in 2017, while remaining competitive in the interim.

Markakis, 31, is a two-time Gold Glove winner expected to replace Heyward in right and in batting leadoff. Although he’s played his entire nine-year career with the Orioles, Markakis kept a home near Atlanta, where he spent much of his youth. He attended high school and college in Georgia (Young Harris College).

“Nick is coming back home to Atlanta, where he grew up a Braves fan, and this is a move that will improve our ballclub in both the short and long term,” Hart said. “Nick is a true professional, and our fans will enjoy the way he plays the game.”

After negotiations with the Orioles stalled and Markakis made it known he would consider other teams, Braves manager Fredi Gonzalez and assistant general manager John Coppolella traveled to Baltimore on Monday and had dinner with him. The Giants and Blue Jays also pursued Markakis.

Markakis’ arrival increases the likelihood of the Braves trading corner outfielder Justin Upton or Evan Gattis, the catcher expected to move to left field next season. Trading Upton seems more likely, since he can be a free agent after 2015 while Gattis is under contractual control through 2018.

While he’s not as sensational on defense as Heyward and doesn’t have as much speed or raw power, the Braves view Markakis as a steadier, more durable player who’d be far less expensive to sign for the next four years. Heyward can be a free agent after the 2015 season and is still trying to fulfill his immense potential.

Markakis is a .290 career hitter with a .358 on-base percentage, 141 home runs and 658 RBIs in nine seasons. Last season he hit .276 with a .342 OBP, 27 doubles and 14 homers, and won his second Gold Glove.

“I think the numbers speak for themselves,” Gonzalez said of Markakis. “But after spending time with him and his family, I think this is a person that (will) be a great asset to our team and our community.”

Earlier Wednesday the Braves signed his friend, former Orioles closer Jim Johnson, to a one-year deal.

Signing Markakis will not cost a compensatory draft pick, since he didn’t get a qualifying offer. The Orioles bought out a $17.5 million option in hopes of re-signing him to a multiyear deal for a salary closer to $10 million. Many Orioles fans expressed how much they wanted Baltimore to re-sign Markakis, one of the team’s most popular players.

If they trade Justin Upton, the Braves likely would have Gattis in left field, Markakis in right, and B.J. Upton in center at least to start the season. They hope that new hitting coach Kevin Seitzer can help B.J. get back on track after two dismal seasons that have made him untradeable (he’s still owed $46 million through 2018).

Markakis hit second or third for most of his career, but primarily leadoff in 2014. He has a .294 average and .353 OBP in 982 career at-bats as a leadoff hitter.

A left-handed hitter, he hits well against lefties and righties: He batted .280 with a .343 OBP vs. lefties and .274/.342 vs. righties in 2014, and has a .288 career average vs. lefties and .291 vs. righties.

He hasn’t struck out 100 times since 2008. Markakis struck out 84 times in 2014, his highest in four years. That would’ve ranked seventh on a strikeout-plagued Braves team that had four players with at least 145 whiffs.