BRASILIA (Reuters) - Brazilian federal prosecutors filed a court injunction on Monday seeking to bar the appointment of right-wing President Jair Bolsonaro's son Eduardo as ambassador to the United States due to his lack of experience as a diplomat.

The public prosecutor's office asked a Brasilia court to rule on the need for non-diplomats to have relevant international experience and served the nation abroad for at least three years.

Opposition lawmakers have also sought to block Eduardo Bolsonaro becoming Brazil's envoy in Washington by introducing a bill against nepotism in the public administration.

Bolsonaro, who has developed close ties with U.S. President Donald Trump since taking office in January, has defended the appointment of his son, saying he is a friend of Trump's family which would help improve relations between the two nations.

But even some of Bolsonaro's allies in Congress, where the Senate has still to confirm the appointment, see the choice as an unprecedented affront to Brazil's experienced diplomatic corps.

Opposition lawmakers are backing bills in both chambers to block nepotism in government appointment, and the Cidadania party has asked the Supreme Court to bar Bolsonaro's appointment calling it "blatant nepotism."

(Reporting by Ricardo Brito; Writing by Anthony Boadle; Editing by Chizu Nomiyama and Alistair Bell)