The BBC has apologised to the Mexican ambassador over remarks made on Top Gear.
But the corporation defended the show's presenters, who branded Mexicans "lazy", "feckless" and "flatulent", saying national-stereotyping was part of British humour.
His Excellency Eduardo Medina-Mora Icaza wrote to the corporation to complain about the "outrageous, vulgar and inexcusable insults".
The BBC said it has now written to the ambassador to say it is sorry if the programme caused offence.
In a statement the corporation said the comments may have been "rude" and "mischievous", but there was no "vindictiveness" behind them.
It said: "Our own comedians make jokes about the British being terrible cooks and terrible romantics, and we in turn make jokes about the Italians being disorganised and over dramatic, the French being arrogant and the Germans being over-organised. Whilst it may appear offensive to those who have not watched the programme or who are unfamiliar with its humour, the executive producer has made it clear to the ambassador that that was absolutely not the show's intention."
The BBC said stereotype-based comedy was allowed within its guidelines in programmes where the audience knew it could be expected.
In the episode, broadcast on January 30, Richard Hammond joked that Mexican cars reflected national characteristics, saying they were "just going to be lazy, feckless, flatulent oaf with a moustache, leaning against a fence asleep, looking at a cactus with a blanket with a hole in the middle on as a coat".
James May described Mexican food as "like sick with cheese on it" and Jeremy Clarkson predicted they would not get any complaints about the show because "at the Mexican embassy, the ambassador is going to be sitting there with a remote control like this (snores). They won't complain, it's fine".
Hundreds of Mexicans contacted the BBC to protest against the remarks which caused national outrage.