The city of Denver has agreed to pay $300,000 to a United Airlines pilot who was arrested last year on an indecent exposure charge that a judge later dismissed.

Andrew Collins' attorney, Craig Silverman, announced the settlement on Monday, according to Denver’s KMGH-TV.

United Airlines pilot Andrew Collins was cited for indecent exposure during a stay at the Westin Hotel at Denver International Airport. (Denver District Attorney's Office)

Collins was arrested in September 2018 after being accused of standing naked in front of his 10th-floor hotel window overlooking the Denver International Airport terminal. He pleaded not guilty.

A judge dismissed the misdemeanor charge in March, but the incident led to a six-month suspension from United Airlines for Collins, from Leesburg, Va.

Silverman has said that Collins didn't know that people could see him when he partially opened the curtains of his hotel room.

Despite returning to his job, Collins told Fox 31 he is still dealing with the consequences of the charges.

CLICK HERE TO GET THE FOX NEWS APP

“I have to explain this situation every day without fail,” Collins said.