LONDON — For rent: a four-bedroom home within easy reach of the shops, restaurants and bars of fashionable north London. It might be a good idea to look after the place however. The owner is Keir Starmer, Britain’s prime minister.

After winning the general election in July, Starmer moved with his family into perhaps the nation’s most famous address, 10 Downing Street, freeing up the house in which he had lived for about two decades.

According to official records released this month, his home has now been leased, as has a south London house owned by Rachel Reeves, the chancellor of the Exchequer, who has also moved into her official residence, 11 Downing Street.

They are not the first senior British politicians presented with the problem of what to do with their properties when coming into power. Both the prime minister and the chancellor are given the use of a London home as well as a palatial country house for weekends.

In 1997, when Labour’s Tony Blair was elected prime minister, he was advised against staying in his north London house for security reasons. But he was also warned against renting it out because of potential political embarrassment.

That was because of a scandal several years earlier when a Conservative chancellor of the Exchequer, Norman Lamont, unknowingly rented his west London apartment to a tenant who, tabloid newspapers gleefully discovered, was a self-described sex therapist working under the name “Miss Whiplash.”

For Blair, instead of leasing his home, he sold it, later regretting the decision when property prices soared.

Starmer bought his north London property in 2004 for about $1.2 million and recently paid off his mortgage, according to British news media reports that cited various records.

In the past two decades, he, his wife and their two teens have put down strong roots in a part of London favored on the political left. He has talked of frequent visits to his local pub, the Pineapple, from which he posted a photo on social media on Christmas Day last year with the message “Traditional Christmas drinks with neighbors in the local. Happy Christmas one and all.”

Although Starmer’s property is only 4 miles away from his office on Downing Street, the family had little choice but to relocate, given the security concerns for a prime minister.

That risk was underscored even while Labour was in opposition earlier this year, when the group Youth Demand protested outside the Starmers’ house to put pressure on Britain for an arms embargo on Israel.

Although renting out a property does not break any rules, the news that the prime minister and Reeves have leased out their homes and stand to gain financially may be seized on by Britain’s right-leaning news media, particularly after a recent set of damaging articles about the prime minister’s accepting free gifts in the past.

But for Starmer, taking in a significant profit from a house that is now estimated to be valued at more than $2.6 million would scarcely be better received.

Leaving it empty would’ve been impractical too. Starmer has a large majority in Parliament, and the soonest he is likely to need his house again is after the next general election, not expected before 2028.