An Air Force sergeant arrested by Spanish police over allegedly trying to smuggle three bags full of cocaine into Spain was part of the Jair Bolsonaro's G20 plane entourage, Brazilian officials have confirmed.

Key points: The sergeant is accused of trying to smuggle 39 kilograms of cocaine into Spain

The sergeant is accused of trying to smuggle 39 kilograms of cocaine into Spain He was travelling on a separate plane to the Brazilian President, as part of his G20 entourage

He was travelling on a separate plane to the Brazilian President, as part of his G20 entourage Brazil's Vice-President said the sergeant was scheduled to embark on the president's plane for the final leg of his trip to Japan

A Spanish police source told Reuters the sergeant was arrested after officers discovered 39 kilograms of cocaine in three pieces of luggage, which police checked on Tuesday while the plane was waiting to continue its journey to Japan for the G20 Summit.

Brazil's Air Force said the sergeant worked as cabin crew on a support aircraft and was not on Mr Bolsonaro's presidential plane.

Vice-President Hamilton Mourao confirmed the sergeant was supporting Mr Bolsonaro's trip to Japan for this week's G20 meeting and had been assigned to remain in Spain before embarking on the president's plane for the final leg of his return trip.

"Obviously, given the quantity of the drug he was carrying, he didn't buy it on the corner and bring it, right? He was working as a mule. A well-qualified mule, so to speak," said Mr Mourao.

On Twitter, Mr Bolsonaro said he had been informed of the arrest by the Defence Minister and ordered "immediate cooperation with Spanish police."

The Brazilian Government says it is cooperating with Spanish investigators and has opened its own probe.

The head of Brazil's security cabinet, general Augusto Heleno, said it was "bad luck" that the incident occurred at such an inopportune moment.

Wires