"Mike Harvey, who had been held in Yemen since February, has been released today," a Foreign Office spokesman in London told AFP.
"He has been released safely and he is being supported by staff at the British embassy and they will work to reunite him with his family very soon."
A Yemeni official said earlier the British hostage, whom he did not name, had been freed in a joint security operation with tribesmen in the Al-Juf area northeast of Sanaa.
The British spokesman said the release was secured by "the government of Yemen who engaged with tribal intermediaries, which is standard practice".
More From This Section
"We're grateful to the government of Yemen for all their support," he added.
On February 13, gunmen abducted the teacher in Sanaa, in the second kidnapping in the capital that month of a Briton.
A security official said the unidentified gunmen seized him as he returned from work.
On February 3, witnesses and oil industry sources said a Briton working in the sector had been kidnapped by gunmen in Sanaa.
Witnesses said the kidnappers struck their victim on the head with the butt of a rifle, before driving him off.
Hundreds of people have been kidnapped in Yemen over the past 15 years, mostly by tribesmen who use them as bargaining chips in disputes with the government.
Nearly all have been freed unharmed.