A United Airlines pilot has walked away with $438,000 after the City of Denver wrongly accused the captain of indecent exposure during his stay at a hotel.

Andrew Collins spent two days in jail in September 2018 after he stood in front of his 10th-floor hotel window naked. Witnesses called police to the Westin Hotel at Denver International Airport, where the 22-year pilot veteran was consequently suspended from his role for six months.

According to Denver ABC, Mr Collins was awarded the massive payout after the judge dismissed the charges.

The father-of-three, who lives in Leesburg, Virginia, claimed he was not aware that people standing in the terminal could see him naked from his hotel room.

It is understood Mr Collins was arrested after a witness informed police that he saw the pilot “touching himself” and waving at him. However, the pilot said that claim was false.

Speaking to The Denver Post after the 2018 arrest, Mr Collins explained the situation.

”I was getting ready for a shower and was talking on the phone,” he said.

“It was a beautiful morning, and I opened the curtains to my window. I couldn’t see the terminal.

“We’re not disputing the fact that I was standing nude in front of the hotel window.

“Some witnesses said I was dancing, gyrating and waving. I’m completely innocent. It’s really unfortunate that it happened at all.”

Mr Collins had been on the phone for 25 minutes when he heard fists pounding at the door of his room.

According to The Post, when Mr Collins answered the door, he was greeted by several police officers with their guns drawn before being handcuffed and taken to an airport jail.

Mr Collins’ lawyer, Craig Silverman, said Mr Collins may also file a lawsuit against Marriott, which owns the Westin hotel chain, for allowing police officers inside the hotel without a warrant.

“The DIA Westin, managed by Marriott, performed poorly (and) we’d like them to step up and acknowledge responsibility,” Mr Silverman told Fox31.

Mr Silverman said the incident had followed the pilot around every day since, with Mr Collins being forced to explain the situation every time he goes to work.

“I’ve been tagged now by Homeland Security — even though this has been dismissed, my record has been expunged and locked up,” he told USA media outlet 9 News.

“I’m asked every time I come back into the country, which may be two times on a single trip, that, you know, have you been arrested recently? Can you tell us about this?”

In a statement, Mr Silverman said his client was a “respected family man and outstanding veteran aviator” who had become the victim of an “unjustified and warrantless” arrest.

”The criminal case against Captain Collins was properly dismissed but not before Captain Collins was suspended for half a year from his job as a direct result of the wrongful charges against him.”

Mr Collins received the $US300,000 settlement last month.