Rather than test the free-agent market this winter, veteran closer Jim Johnson re-upped with the Braves Sunday, signing a two-year contract extension on the final day of the season.

Johnson, 33, and Braves general manager John Coppolella said the plan would be for Johnson to go to spring training as the team’s closer, but that his role could change at any time over the course of the contract.

The sinkerballer’s success with the Braves and pitching coach Roger McDowell over most of two seasons – he’s struggled with three other teams since leaving Baltimore after 2013 — played a big part in his decision to re-sign with Atlanta.

“Absolutely,” said Johnson, who has a 2.72 ERA and 29 saves in 114 appearances for the Braves over two seasons, with 101 strikeouts and 34 walks in 112 2/3 innings, including a save in Sunday’s season-finale 1-0 win against the Tigers. “Working with Roger the last couple of years has been beneficial to me. Obviously the respect that Snit (interim manager Brian Snitker) gets from the guys, how he’s done a great job this year. I have no say in that (upcoming managerial hiring), but I think you know where I lean to.

“And obviously the guys that are coming up — I look at it as this last year has been a development year for the organization. Now I think it turns into this is about winning and competing consistently. I’m excited about that chapter.”

Johnson had a 3.06 ERA and 19 saves in 65 appearances this season with 68 strikeouts and 20 walks in 64 2/3 innings. He thrived after moving from a setup role back to full-time closer in the second half of the season, following the early season trade of Jason Grilli and subsequent injuries to closer Arodys Vizcaino.

In his last 48 games he had a 1.65 ERA with 51 strikeouts and 12 walks in 49 innings, and before giving up a run apiece in consecutive appearances Thursday and Saturday he had a 0.99 ERA and .173 opponents’ average in 27 appearances over a two-month span while converting 16 of 16 saves.

“(The contract) was something that we had worked on for about a month,” said Coppolella, who pulled back Johnson from the waiver wire last month after he’d been claimed by another team. “We saw the job that JJ did and we felt like he would be a big part of our team in 2017-2018 as we looked to get back to being a playoff-caliber club.”

The Braves’ bullpen made strides as the season progressed and a core of reliable relievers emerged including midseason pickup Chaz Roe, Chris Withrow, left-hander Ian Krol, rookie flamethrower Mauricio Cabrera and Jose Ramirez. All are under contractual control for next season and most for multiple years. The Braves could also have lefty Paco Rodriguez, who missed the season recovering from Tommy John surgery, and Dan Winkler, who suffered a fractured elbow in April.

“There were a lot of guys that were kind of pressed into it out of more of a necessity, rather than earning it to get to this level,” Johnson said the bullpen improvement. “Now, I think things have kind of settled down over the last couple of months and you kind of see the picture that’s presented itself to everybody.

“That stabilizing force, the back end of the bullpen, is always an important part that winning teams have. If you can shorten the game, you’re going to win more games than you lose. I think that’s what I can bring and what I can helps us as a group do on a consistent basis.”

Johnson’s leadership has been noted frequently by other relievers, particularly many of the youngster the Braves brought up over the past two seasons. That also factored into the Braves’ decision to re-sign him.

“As good as he is on the field, he’s just as good off the field,” Coppolella said.

Johnson collected 51 saves for the Orioles in 2012 and 50 in 2013, then had a career-worst season for Oakland and Detroit in 2014 (combined 7.09 ERA) before signing a $1.6 million deal with Atlanta and having a career resurgence in 2015.

After crafting a 2.25 ERA in 49 appearances with the Braves in the first four months of the 2015 season, he was traded to the Dodgers and had a 10.13 ERA in 23 games and was left off their playoff roster. Johnson had double-hernia surgery in the offseason and re-signed with the Braves in November for $2.5 million.

“He was good with us last year and ran into some bad luck when he went out west,” Coppolella said. “He’s somebody that we’ve always liked. We signed him following the 2014 season, we signed him following the 2015 season, and now we’re signing him at the end of the 2016 season.”