Andre Braugher was ready to bolt. After three seasons of playing icy loner Detective Frank Pembleton on “Homicide: Life on the Street,” the actor was ready to move on — until writers decided his character would suffer a stroke that would force him to learn how to walk, and bark, all over again.

“It was necessary for me to stay a member of the show,” Braugher told me on the drama’s Baltimore set in 1996. “I need a compelling character. I need a challenge.”

Mary McDonnell can relate. In the reboot of “Battleship Galactica,” she played President Laura Roslin, who battled breast cancer, not to mention a series of Cylon attacks. She also received rave reviews as a doctor with Asperger’s syndrome on “Grey’s Anatomy.”

But in her starring role in “Major Crimes,” which returns to TNT on Monday after a three-month hiatus, she inhabits the part of Capt. Sharon Raydor, one of the sanest, stablest and most sensible characters on TV.

Where’s the fun in that?

“I understand exactly what you’re asking,” McDonnell, 62, said in a phone interview. “Sometimes I watch ‘Homeland’ and I think, ‘Wow, it would be fun to do what Claire Danes is doing.’ Then other times I watch and think, ‘Um, Claire, are you OK?’ ”

McDonnell has a long career of playing rich characters. She has two Oscar nominations, one for playing Kevin Costner’s stoic love interest in the epic western “Dances With Wolves,” the other for “Passion Fish” as a former soap opera actress who drowns herself in booze after an accident leaves her paralyzed. She will soon return to the stage after a 17-year hiatus to perform Anton Chekhov’s tragedy “The Cherry Orchard” in Philadelphia with her daughter.

But she seems to enjoy Raydor, perhaps her most grounded role to date — despite the occasional temptation to take a walk on the wild side.

“I’m relishing the economy of the character and playing someone with balance, someone everyone can get behind,” she said. “I mean, we’re actresses. We like to rail. Every once in a while, I’ll have her fly off the handle, but then the director and I will talk and decide that’s not the way to go.”

Raydor wasn’t always Miss Congeniality.

The character was introduced in 2009 as Kyra Sedgwick’s nemesis in “The Closer.” When Sedgwick decided to quit the series in 2012, TNT served up “Major Crimes” as a spinoff and shaved off much of Raydor’s brittleness.

“I wasn’t looking to do a procedural,” McDonnell said. “You know what got me? The change. I liked the idea of taking this antagonist and slowly developing her into a hero.”

The decision has paid off. The 2012 premiere had 9.5 million viewers, the most for a series premiere on basic cable. Ratings for the rookie season were the highest for any new cable show. Now in the midst of its third season, the series has been renewed for a fourth.

“Battlestar” and now “Major Crimes” have given McDonnell the kind of stability her character tries to maintain.

“For so many years, I was a vagabond,” she said. “While I cherished that time, I also cherish the gift this past decade has given me to get a real chance to breathe and enjoy these gifts.”

Not that she wouldn’t like Raydor to show off some new dimensions. A love interest would be nice, and perhaps even a promotion to Los Angeles police chief.

Why stop there? How about Raydor for mayor?

“Yeah!” McDonnell said. “Let’s push that one around.”