Officers forced entry to the house in Wood End Lane, Northolt, west London, at about 20:10 BST and detained a man in his 40s.
They say a search of the house is under way to make sure it is safe so that evacuated neighbours can return home.
Police said negotiations with the man had been unsuccessful.
A cordon of 200m had been in place at Wood End Lane since 01:00 BST on Friday, which was extended to 300m on Saturday.
About 80 residents have had to spend two nights away from their homes as officers negotiated with the man.
Scotland Yard said officers from the Territorial Support Group were supported by the London Fire Brigade as they moved in on the address.
Ch Supt Paul Martin said: "I am really pleased that this incident has now ended, and importantly ended without anyone coming to harm.
"Our key priority throughout this was to get the man out of the address safely as we had growing concerns about his well-being and believed him to be in crisis.
"After attempts to negotiate over a number of days did not work we used specialist officers to work out how we could gain entry to the address as safely as we could. They did that this evening."
Ch Supt Martin said police had also worked closely with the ambulance service and the local authority during the operation.
Searches of the property will be conducted "as quickly as we can to make sure people get home", he added.
Police had said there was no suggestion the incident was terror-related or linked to any ongoing police operations or investigation.

The new console will be released in the UK on 3 March and will cost UK gamers Â£279.99.
There are more than 80 games currently being developed for the console, but big names like Super Mario and The Legend of Zelda have been confirmed.
In October 2016, we got our first proper look at the console, and we compared it to some of the other top consoles available.

The Welshman's withdrawal means neither he nor Tour de France winner Chris Froome will compete in the USA.
Froome broke a foot in a crash at the Vuelta a Espana, ruling him out.
"It's been a hard decision to make but the season has taken its toll on me and I don't feel physically up for a good Worlds," Thomas, 29, wrote on Facebook.
"I don't want to go there just to make up the numbers, I'd want to be competitive or at least do a good job for the boys."
Thomas says he wants to rest ahead of 2016 when he feels a top-five Tour de France spot is possible along with an Olympic track medal.
"I love racing for GB and the Worlds are a really special race so it was a difficult decision to make, along with the team, but I feel it's best to rest up now before it's all systems go for a big year next year."
Fellow Briton Mark Cavendish crashed out of the Tour of Britain last week and suffered a shoulder injury, but is hopeful of competing in Virginia as the men's road race takes place on the final day of the championships - 27 September.
A three-day stand-off between armed police and a man feared to have stockpiled petrol at his home has ended after officers entered the property.
[NEXT_CONCEPT]
Nintendo has revealed lots of new details about its brand new console, the Nintendo Switch.
[NEXT_CONCEPT]
Geraint Thomas has pulled out of the UCI World Road Race Championships in Virginia from 19-27 September, saying he does not feel "physically" up to it.