A United Airlines pilot who was busted for being naked in his hotel room overlooking Denver International Airport got a $300,000 wrongful arrest settlement from the city, a report said.

Andrew Collins, of Virgina, was arrested in September 2018 inside the Westin after airport employees reported seeing the pilot touching himself through the 10th-floor hotel window, according to Fox31 Denver.

Collins’ attorney, Craig Silverman, said it’s not against the law to be naked inside a Denver hotel room. He also claimed that Collins had no clue he could be seen from the outside, the report said.

A judge dismissed the charges in March.

Collins, who was suspended for six months, but is now back flying, explained how the arrest had complicated his daily routine.

“I have to explain this situation every day without fail,” he told the cable network.

But despite the hardships, he’s celebrating his legal win.

“That’s how we protect our rights — by holding people accountable,” he said.