Tony Romo, right, acknowledged that Dak Prescott, left, has earned the right to be the Cowboys’ starter at quarterback. (LM Otero/Associated Press)

Good for Tony Romo. That was a classy move.

Romo will leave Dallas — and yes, he will leave Dallas to continue playing football as a starting NFL quarterback, although he didn’t exactly say so Tuesday — with his dignity intact.

The former Cowboys quarterback acknowledged that the team now belongs to the current Cowboys quarterback, Dak Prescott.

“He’s earned the right to be our quarterback,” Romo said, reading from a prepared statement as he addressed reporters at the team’s training facility Tuesday. “As hard as that is for me to say, he’s earned that right.”

Romo wouldn’t have changed the situation with a different approach. The Cowboys have won eight straight games and have an NFL-best record of 8-1 with Prescott, the rookie who took over after Romo suffered a compression fracture of a vertebra in his back during the preseason. The team already decided to stick with Prescott as the starter, and Romo is to return as a backup for this Sunday’s game at home against the Baltimore Ravens.

But not every quarterback would have handled the situation as gracefully as Romo did. Romo isn’t merely a good quarterback. He was an MVP-caliber player the last time he was healthy for an entire season, throwing for 3,705 yards and 34 touchdowns with only nine interceptions as the Cowboys won the NFC East title in 2014.

Romo could have fought this at every step. He could have stewed silently. He could have divided the locker room. He could have played the role of Brett Favre in Green Bay to Prescott’s Aaron Rodgers.

But he didn’t. He acted like a pro. He acted like someone secure with his place in the sport. The Cowboys will benefit from that, perhaps by riding the excellence of Prescott, rookie tailback Ezekiel Elliott and their dominant offensive line to the Super Bowl. If Prescott gets hurt or falters along the way, Coach Jason Garrett can turn back to a highly accomplished veteran who has further cemented his status within the locker room as a team-first leader.

Romo spoke for about 6 1/2 minutes Tuesday and didn’t take questions from reporters. His comments were honest and heartfelt. He didn’t hide his bitter disappointment over being injured for a second straight season.

“Getting hurt when you feel like you have the best team you’ve ever had was a soul-crushing moment for me,” Romo said.

He spoke of everyone knowing that something magical is happening with these Cowboys. He spoke of having Prescott’s back and knowing that Prescott has his. He spoke of wanting to keep playing.

He didn’t say that his days as a Cowboys quarterback are over. But, barring an injury to Prescott, that almost certainly is the case. He is 36. He would count $24.7 million against the Cowboys’ salary cap next season if he were to stay. That is too much to pay for a backup quarterback.

Romo probably will be a starting quarterback in the NFL next season.

It won’t be in Dallas.

His farewell speech Tuesday should be remembered fondly as the stand-up gesture that it was.