MIAMI — The Washington Nationals had their manager back in the dugout Friday night when they began a three-game series against the Miami Marlins. Dave Martinez underwent a cardiac catheterization Monday after experiencing chest pains during a game. Four days later, Martinez was cleared to travel and rejoined the team in the thick of a wild-card race.

He walked into the visiting clubhouse at Marlins Park around 4 p.m. on Friday and went straight to Max Scherzer. They hugged, Scherzer told Martinez it was great to see him again, then players cycled by to high-five their manager and ask whether he was doing well. Martinez couldn’t get the smile off his face.

“Honestly, I’d rather not talk about my health,” Martinez said at the start of his pregame interview. “I’m actually good. The bottom line is they ran all these tests, I had an unbelievable doctor, everything came out negative, so I feel good and I’m ready to go. That’s the gist of it.”

Then Martinez emotionally thanked his family, fans and everyone around baseball who supported him during a trying week. He left Sunday’s win over the Atlanta Braves in the sixth inning, and the team’s training staff suggested he go to the hospital, where doctors decided he should have the catheterization. Martinez, 54, got good news Tuesday when the results didn’t call for additional procedures. He then was mandated two to three days of rest with no air travel, according to a person with knowledge of the situation, putting him on track to return Friday.

During his time away, Martinez watched three games on television and had a chance to reflect on his team and this season. He looked at everyone’s individual numbers — something he doesn’t do too often during the season — and plotted how he will manage the rest of the way. But mostly he slept and slept some more, feeling the weight of a long year and his recent health scare.

“It stunk. It really did. It was hard to watch the games and not be a part of it with the guys in the dugout,” Martinez said. “But I’m back. There’s nothing I could’ve done except try to get healthy and see what was going on. I’m back and excited, and we move forward, and here we are today playing the Marlins.”

When asked whether he had to change anything about his behavior, Martinez laughed while saying he can only be himself. But he is swearing off coffee — “I’m going to stick to water for a while,” he added — and seemed relieved that the results weren’t worse.

General Manager Mike Rizzo explained this week that Martinez is expected to get more tests down the line, but those will be to monitor his heart. Rizzo spoke encouragingly about the feedback Martinez received at the hospital, where he stayed until Tuesday. Martinez then flew to Miami on Thursday with the Nationals off and rested before heading to the ballpark early Friday afternoon.

Bench coach Chip Hale filled in during Martinez’s absence. Washington lost its series to the Cardinals and entered Friday one game up on the Milwaukee Brewers for the National League’s top wild-card spot. The Chicago Cubs were a game and a half back of the Brewers after an afternoon loss. The race is tight — much more than it was a few weeks ago — and the Nationals were hoping that their manager could return as soon as possible.

The organization viewed Friday as a best-case scenario for Martinez’s return. And there he was in the afternoon, chatting with his players as he always does, looking as if he never left. The return felt more official once he began discussing injuries and other inner workings of his team and the pennant race. Kurt Suzuki, sidelined with elbow inflammation, threw from 60 feet and will be available to pinch-hit against the Marlins. Matt Adams, out with a left shoulder strain, took on-field batting practice and is making progress.

The Nationals need to otherwise keep their focus narrowed on Miami, a team they can’t afford to lose to, and let the rest of the race shake out. Four days away didn’t change Martinez’s message one bit.

“It was awesome to see these guys. Regardless of what happens, the outcome, being around these guys, a great bunch of guys,” he said. “They brighten up my day every day. The conversations that we have daily, I missed that the last few days.”

Martinez then paused for a split second before saying what he couldn’t get off his mind.

“I’m glad to be back.”

LINEUPS

Nationals (83-68)

Trea Turner SS

Adam Eaton RF

Anthony Rendon 3B

Juan Soto LF

Howie Kendrick 1B

Asdrúbal Cabrera 2B

Victor Robles CF

Yan Gomes C

Aníbal Sánchez P

Marlins (53-99)

Jon Berti CF

Miguel Rojas SS

Neil Walker 1B

Starlin Castro 3B

Isan Diaz 2B

Jorge Alfaro C

Lewis Brinson RF

Austin Dean LF

Robert Dugger P

Read more on the Washington Nationals: