Qatar Airways CEO Akbar Al Baker considers Donald Trump a friend, and he does not fault the U.S. president for trying to get the best deals for America.

"I have always said he's my friend. In friendship, you'll always have ups and downs. But it doesn't mean anything. He's doing a good job for his country," Al Baker told CNBC on Monday from the Farnborough International Airshow in the U.K.

"Every leader wants to look at the best interest of his country. In the process, he may upset a lot of people. But at the end of the day, this is all politics," Al Baker added in the "Squawk Box" interview.

Al Baker also thanked Trump for resolving a yearslong dispute between Qatar Airways and major U.S. carriers.

In January, state-controlled Qatar Airways agreed to disclose financial information within a year, seen as a victory for major U.S. airlines that have complained over the last three years that some Persian Gulf-based carriers benefit from unfair government subsidies.

"What did all that people who wanted [and] made all this noise and spent millions in lawyers fees, what did they achieve? We were already publishing our accounts," said Al Baker, also chairman of the board of governors of the International Air Transport Association trade group.

"They were creating a story about what was not being done by Qatar Airways. We are happy President Trump decided to end this fiasco that we were all getting through and wasting our time, wasting our energy, wasting our attention instead of growing our business," he added.

Al Baker also responded to comments he made last month that created a stir. At the IATA annual meeting in Sydney, he said airlines need to be run by a man "because it is a very challenging position.”

"It was taken out of context," he told CNBC on Monday about those comments. The first remark was tweeted and went viral, he added. "All the positives things I said about the ladies was not taken."

He also said women hold board seats at IATA for "the first time" and "we are promoting more women to come and take senior management positions at IATA under my chairmanship."