Plans to build a new hospital ward have been approved after "serious defects" were found in seven-year-old buildings.
Roseberry Park in Middlesbrough opened in 2011 but has had problems with its roof, plumbing and fire safety system.
The new 28-bed ward will house "secure mental health patients".
About 50 people had to be moved to a hospital in Hartlepool because of problems with the hospital, described as "shoddily built" by Middlesbrough MP Andy McDonald.
Middlesbrough Council's Planning Committee approved the plans by Tees, Esk and Wear Valleys Foundation NHS Trust on Friday.
Joe Biggs, acting for the trust, told the committee the new single-storey ward was necessary to house "secure mental health patients" after a series of serious failings were discovered in the existing hospital buildings.
Mr Biggs said the trust was exercising its rights under the Private Finance Initiative agreement with site owners to carry out extensive remedial works on the buildings.
He said that "serious defects" with the fire safety system had left the trust with "no option" but to re-house patients while works were carried out.
The building contractor, Laing O'Rourke, said in January it was undertaking remedial works, and was "committed to reaching agreement with the trust" so that additional works could be "progressed in a timely manner".
The new ward will be placed behind a security wall within an area currently used for parking at the site.
Middlesbrough MP Mr McDonald has previously voiced concern over the hospital, calling it "substandard" and with "fundamental construction problems".
The mental health hospital, located off Marton Road, replaced the old St Luke's Hospital in 2011.