President Obama says he will "probably" stay in Washington for a few years after his term ends so that his youngest daughter can finish high school. (Reuters)

President Obama can issue sweeping executive orders and deploy troops to faraway corners of the world. But it became clear Thursday that the leader of the free world sometimes takes orders from his 14-year-old daughter.

Over lunch with a small group of supporters in Milwaukee, Obama said he and his family plan to stay in Washington for a couple of years after his presidency so that Sasha, the younger of his two daughters, can finish high school.

The result is that Obama will be the first former president since Woodrow Wilson, nearly a century ago, to remain in the nation’s capital after leaving the White House.

There has been endless speculation over where the Obamas would settle once his presidency ends, much of it focused on whether it will be New York, Chicago or Los Angeles.

But almost by accident Thursday, the president seemed to confirm that it’ll be Washington — at least for a while.

President Obama said on Thursday that he would remain in Washington, D.C. for "a couple of years" while daughter Sasha finishes high school. We consider the pros and cons of some of the District's top neighborhoods. (Victoria Walker,Monica Akhtar/The Washington Post)

Obama had lunch in Milwaukee with four women and a man, all of whom had written him letters in praise of the Affordable Care Act. As they chatted about the weather and the Midwest, Obama started sounding wistful about Chicago. “It always feels good being closer to home,” he said as they ate at Engine Company No. 3, a Milwaukee restaurant.

One of the women asked about Hawaii, where he was born. “Hawaii is home for me,” he replied, but he also suggested his real home is Chicago. “I spent almost 30 years in Chicago,” he said, also noting that it is Michelle Obama’s as well. Someone at the table then asked where he and the first lady would live after he was done with the presidency, as boom microphones hovered overhead and reporters stood about 15 feet away.

“We haven’t figured that out yet,” he said. “We’re going to have to stay a couple of years so Sasha can finish” school, he said. “Transferring someone in the middle of high school — tough.”

Sasha’s sister, 17-year-old Malia, is headed to college in the fall.

The White House declined to comment any further on Obama’s post-presidential plans, although it is likely he will spend considerable time on the Obama Foundation at the University of Chicago.

The announcement was not a surprise: Obama had hinted at it during a 2013 interview with Barbara Walters of ABC News, noting that his younger daughter will have 2  1 /2 years of high school left at Sidwell Friends School: “Sasha will have a big say in where we are.”

Still, it marks a departure from presidential custom. William Seale, a historian at the White House Historical Association, noted that although a handful of other ex-presidents have stayed in Washington, that remains the exception rather than the rule. John Quincy Adams and Howard Taft spent the rest of their lives here: Adams served in Congress, while Taft became the chief justice and was instrumental in getting the building in which the Supreme Court now resides constructed.

Wilson’s stay was out of necessity: He was in poor health and moved into a house on S Street NW. Gerald and Betty Ford actually wanted to remain in the area but couldn’t. “The Fords always intended to go back to the house they had designed and built in Alexandria,” Seale said. But the Secret Service informed them that they would have to buy the entire street in order to make it sufficiently safe. “They were heartbroken and went to Palm Springs,” Seale said.

But President Obama and his wife do not have that kind of emotional bond to the region. They regularly volunteer at schools and homeless shelters, but expectations that the nation’s first African American president would emerge as a powerful advocate for the District and play a prominent role in its civic, political and cultural life have yet to materialize.

When the couple go out to dinner at local restaurants, it is usually with close friends serving in the administration. Most of the time, they attend private dinners to raise money for Democratic candidates. Or they go to the home of White House senior adviser Valerie Jarrett, a friend from Chicago.

Obama did not have the District’s “taxation without representation” license plates put on presidential limousines until his second inauguration, and although he backed voting rights for the city in his first campaign, he effectively traded away its right to fund abortions for poor women in a budget deal with House Republicans.

There’s no word yet on whether Obama is ready to join the ranks of the disenfranchised (D.C. residents do not have voting representation in Congress): White House press secretary Josh Earnest already said that Obama planned to cast his vote in his adopted home state’s Democratic presidential primary.

In response to the news, D.C. Mayor Muriel E. Bowser (D) said in an email she was “happy to have the Obamas as residents of the District” and that perhaps “they would be interested in serving on a D.C. board or commission.”

The Obamas could live in Maryland or Virginia, sidestepping the no-voting question, but a president who experienced a peripatetic childhood moving from Hawaii to Indonesia has given his daughters a more settled one.

Real estate agents have already begun to speculate on where the first family will settle down and which homes would pass muster with the Secret Service. Will they consider CityCenterDC, where former attorney general Eric Holder and his wife, Sharon, have a condo and where Michelle Obama has visited on occasion? How close must any house be to Sasha’s high school or SoulCycle, the first lady’s favorite exercise studio?

“With Sidwell Friends, you’re probably looking at something like AU Park, Chevy Chase, Friendship Heights, on the D.C. side. It’s not too far from Spring Valley, which has large homes that could sustain extra Secret Service details,” said Michael Alderfer, a Redfin agent.

“You could always go classic and go Georgetown or Capitol Hill,” he said. “But with all his dealings with Congress during the past eight years, he’d probably want to be as far from there as he can get.”

One possibility: If Hillary Clinton (D) wins the White House, the Obamas could rent the Clintons’ house in Washington, a 5,500-square-foot brick Colonial in Northwest that has already been given the Secret Service’s approval.

It is unclear whether Obama will keep up his ritual of playing golf on weekends at Joint Base Andrews, although he always has the fallback option of going to Maryland’s Congressional Country Club (where all presidents enjoy honorary memberships).

And while D.C. is likely to be just a temporary stop on the way to a bigger city, Seale said that the new Washington can offer Obama a degree of anonymity it couldn’t promise to other ex-presidents.

“In a way, one can vanish in Washington now in a way that was not possible long ago,” he said. “Washington has become a city.”

Eilperin reported from Washington. Aaron C. Davis and Jonathan O’Connell in Washington contributed to this report.