A 51-year-old man with active arrest warrants was successfully taken into custody on Saturday afternoon -- after refusing to exit his motorhome during a traffic stop by police.

The motorhome was stopped by police officers for expired registration.

Police say when they stopped the vehicle, the man, Matthew Earl Allen, displayed erratic behavior -- not providing his name, not providing identification, growing angry with officers at having been stopped and stating that he was on his way to get license tabs.

When police discovered his identity by checking the Department of Licensing photo on the squad car computer, they learned Allen had active arrest warrants for DUI, obstructing and resisting arrest.

Other officer safety flags were included in the information available to the officer -- as Allen had used pepper spray and a bat against police in the past.

Allen slid open a window of the motorhome and shouted at the officer, according to police. When Allen was advised he was under arrest, per the warrants, he grew hostile and refused to fully open either the window or door.

Police say an axe and knife were both visible. Allen was not threatening officers with the weapons, according to police.

Stop sticks -- which would have flattened the tires of the vehicle, had Allen attempted to leave -- were placed under his wheels. A crowd gathered with camera phones.

Officers reasoned with Allen for over an hour -- even getting his cigarettes at one point, according to officials.

They warned Allen repeatedly that they would place gas inside the motorhome if he did not cooperate.

Officers then opened the rear window of the motorhome and set a gas canister inside. Allen promptly emerged from the vehicle and was arrested peaceably, police say.

Allen reported no illness from the gas -- and was evaluated at the scene by Bremerton Fire Medics.

Police say Allen sang several bars of the Beatles’ "Let It Be"’ to officers. When asked why he did not come out after advised gas would be utilized, police report he said -- "I didn't think you would do it.”

Allen has been booked into Kitsap County Jail.