NEW YORK — Tony Blair’s travels to Yale keep bringing him to late-night television studios.

Last year, just before the former British prime minister began teaching a course on faith and globalization at Yale, he stopped by the set of “The Daily Show,” where Jon Stewart asked, “Faith and globalization: which side is winning?”

Blair sidestepped that question, but he couldn’t avoid other, more pointed questions from Stewart about the war in Iraq and his relationship with former president George W. Bush ’68.

The conversation was similar on the set of the Ed Sullivan Theater yesterday, where Blair found himself back in the hot seat for his first appearance on “The Late Show with David Letterman.”

Before Blair came out on stage, Letterman quipped in his monologue that “President Bush and Tony Blair were kind of like colleagues, friends, partners, buddies.”

“Bush learned a great deal, a lot of things, from Tony Blair,” he added. “Learned about cheeky, learned the word ‘fortnight,’ learned bangers and mash. And Blair learned some things from George W. Bush. ‘Whoops’ and ‘uh-oh,’ ‘dang.’ Those are the kind of things he learned from him.”

For his part, Blair defended some of the decisions that Letterman might consider worthy of an “uh-oh” or two. After Letterman pressed him on the ongoing conflict in Iraq, Blair responded that “if you had left Saddam [Hussein] in power, given the history, given the wars that he started, given the history he had of using chemical weapons even on his own people, my view is that the world is safer without him.”

There were more laughs, of course, when Letterman was riffing on differences between life in Britain and America.

“We’ve never had, I don’t think we’ve had a prime minister, current or former, on the show ever. Plenty to talk about: for example, are [the British] still driving on the other side of the street? That’s crazy.”

The news that drivers in Samoa, the small South Pacific country, switched from driving on the right side of the road to the left side this week was almost too good to be true for Letterman.

“The other thing about having Tony Blair here … I have nothing to ask him,” he joked early in the show. “I don’t know, what am I going to say? I got the driving thing and that’s it.”

Letterman was prepared, though, and soon after Blair entered to a rendition of “Rule Britannia,” the host asked him how life was different after his time at 10 Downing St.

Blair explained that the day after he left office two years ago he got his first cell phone and sent a text message to a friend.

“Hi, how are you, please get in touch,” was the gist of the text, according to Blair, who added that “because I’m technologically illiterate really I didn’t realize that my name didn’t come up on the text I sent him. So he sent me back a text that said, ‘Sorry, but who are you?’ And I was kind of sitting there thinking: it’s been 24 hours.”

Perhaps preying on that insecurity, Letterman arranged for six shirtless men to sit in the studio audience yesterday, each with a letter painted on his chest. Together they spelled out MAGGIE, and one of them asked when “Margaret Thatcher’s coming out,” referring to the 84-year-old former British prime minister.

But it was most definitely Blair in the studio yesterday. As the show neared an end, and as the time came for Blair to hop in a car for the ride to the President’s House on Hillhouse Avenue, Yale’s most famous professor explained that his course at the University teaches students “about religion and its place in the world.”

Letterman would not let his guest out of the beige chair, though, before he exhorted him to “do something about that mess in Samoa.”