The man fired a handgun at officers when they stopped his Vauxhall Cavalier to question him about an expired tax disc. He sped off before abandoning the car and then stealing a BMW at gunpoint.
West London was brought to a standstill after he led police on a chase through Hounslow, Twickenham and Feltham. At one point he fired a rifle at police officers.
The pursuit ended in Shaftesbury Avenue, Feltham, when the man took refuge in a house, prompting a lengthy stand-off. Neighbours reported hearing shots.
A family of three had been trapped in the flat above during the siege, but were unharmed.
Police stated that the suspect was detained at 8.55pm, when armed police went into an address in Shaftesbury Avenue. The statement added: "Nobody was injured, neither police nor suspect, no shots were fired.
"Police entered the premises after reports of the sound of an explosion and shots inside the premises. Although the premises are now being searched, so far no weapons have been recovered."