Image copyright AP

Yale University is renaming a college that honours a former politician who was an advocate of slavery to recognise a female computer scientist instead.

Calhoun College will be renamed to honour Grace Murray Hopper, who helped transform the way people use technology.

Hopper earned Yale degrees in the 1930s and became a US Navy rear admiral.

Saturday's announcement, which follows years of debate, reverses a decision made last year.

The Ivy League university said the move ends the controversy over the former politician and defender of slavery John C Calhoun, whose legacy led to campus protests in 2015.

Four people were arrested in a peaceful protest as recently as Friday after they blocked a road near the residential college.

Yale University president, Peter Salovey, announced in April that the school would keep Calhoun's name. However he later appointed an advisory panel to determine whether the decision was correct.

Read more

On Saturday, Mr Salovey said that Calhoun College, which was given the name in the early 1930s, was an exceptional case because the former US vice-president's legacy was at odds with the university's values.

"We have a strong presumption against renaming buildings on this campus," Mr Salovey said, adding: "I have been concerned all along and remain concerned that we do not do things that erase history."

Calhoun, a member of the Yale class of 1804, was a senator from South Carolina and a leading voice for those opposed to abolishing slavery. He served as vice-president from 1825 to 1832.

The university said it will not remove symbols of Calhoun from its campus and will allow alumni to continue associating with the Calhoun name instead of Grace Hopper College.

Image copyright AP Image caption Rear Admiral Grace Hopper used her mathematics "to fight fascism during World War Two"

However Mr Salovey said he hoped the university community would now "embrace Grace Hopper and get to know her better".

She earned a doctorate in mathematics and mathematical physics from Yale in 1934.

Hopper later enlisted in the Navy and "used her mathematical knowledge to fight fascism during World War Two," the university said.

Hopper then invented the first computer compiler, which helped computers understand simple commands.

She retired as a Navy rear admiral aged 79, and died in 1992 at the age of 85.