The British teacher jailed in Sudan for letting her students name a teddy bear Mohammad won a pardon on Monday and was released into British care.

Gillian Gibbons, sentenced on Thursday to 15 days in jail followed by deportation for insulting Islam, was pardoned after an appeal by two prominent British Muslims to Sudan's president for her early release.

An adviser to Sudanese President Hassan al-Bashir, asked to confirm Gibbons had been pardoned, said: Definitely, yes.

Students waved flags and beat drums in protest outside the British embassy in Khartoum, following demonstrations on Friday when sword-waving Islamists called for the teacher's death.

Gibbons apologized after the pardon announcement for any discomfort she had caused to the people of Sudan. The British embassy said she was in its care.

I have been in Sudan for only four months but I have enjoyed myself immensely. I have encountered nothing but kindness and generosity from the Sudanese people, she said, in a statement read by British Baroness Sayeeda Warsi, one of the peers who met Bashir.

I have great respect for the Islamic religion and would not knowingly offend anyone. I am sorry if I caused any distress.

A Sudanese presidential adviser said she was expected to leave Sudan on Monday. She was leaving for security reasons.

Gibbons prompted a complaint after she let her pupils at Khartoum's private Unity High School pick their favorite name for a teddy bear as part of a project in September.

Twenty out of 23 of them chose Mohammad -- a popular boy's name in Sudan, as well as the name of Islam's Prophet.

The two British peers, Warsi and Lord Ahmed, had launched a private initiative to secure Gibbons' early release. They delayed their departure after President Omar Hassan al-Bashir confirmed a last-minute meeting, following a two-day wait.

The staff of Unity High School where Gibbons worked shouted gleefully when they heard the news.

Everybody is so happy, everyone is just laughing now, Robert Boulos, head of the school, told Reuters.

He said Gibbons would be welcome to rejoin the teaching staff if she wanted. Gibbons had been suspended following a school investigation into the affair.

BRITAIN WELCOMES RELEASE

British Prime Minister Gordon Brown, whose country has had poor relations with Sudan for several years mainly due to the ongoing conflict in Darfur, said he was delighted and relieved to hear that Gibbons would be released shortly.

Common sense has prevailed. She will be released into the care of our embassy in Khartoum after what must have been a difficult ordeal, he said in a statement.

Sudan's influential Council of Muslim Scholars had urged the government on Sunday not to pardon Gibbons, saying it would damage Khartoum's reputation among Muslims around the world.

About 50 demonstrators shouting There is no God but Allah and We will die for the Prophet Mohammad handed over a petition to the embassy about the affair.

Retracting this light sentence ... would wound the sensibilities of the Muslims in Sudan, Council Spokesman al-Sheikh Mohammad Abdel Karim said.

Many Sudanese said they thought it was an innocent mistake which could be forgiven after an apology.

Khartoum has had tense ties with the West in recent years over disagreements over how to handle Darfur, where the U.N. Security Council wants to deploy a joint U.N.-African force to help end the conflict and help displaced people return home.

Khartoum reluctantly agreed but is disputing many details. International experts say some 200,000 people have died and 2.5 million have fled their homes in ethnic and political conflict in Darfur since a revolt by mostly non-Arab rebels in 2003.

(Additional reporting by Andrew Heavens in Khartoum and Kate Kelland in London; Writing by Cynthia Jonston, Editing by Elizabeth Piper)