Image copyright GraphicaArtis/Getty Images Image caption Portrait of Thomas Jefferson by Rembrandt Peale

A Virginia city that became the site of a deadly white nationalist rally in 2017 is preparing to celebrate a new holiday marking the end of slavery.

On Tuesday, Charlottesville will mark the first "Liberation and Freedom Day" to commemorate the freeing of the city's slaves in 1865.

The holiday will replace an annual birthday celebration of US Founding Father Thomas Jefferson, a slave-owner.

The city voted last year to scrap the April Jefferson holiday.

The third US president, who wrote the Declaration of Independence and founded the nearby University of Virginia, is often central to debate over Charlottesville's legacy of racial discrimination.

His estate, Monticello, once enslaved hundreds of African Americans.

When Union troops marched into the city at the end of the US Civil War, there were 14,000 black people living in the Charlottesville area, representing a majority.

The city council said the new local holiday, which will see many city offices and official buildings close, has "shifted the focus from a slave-owner's birthday".

"While there are many things we appreciate about Jefferson's contributions to the United States and our community, today the city is being much more intentional about telling a more complete history of our community," city council said in July, when the body voted to axe the Jefferson holiday.

The Founding Father's birthday on 13 April had been celebrated every year since 1945.

Why Charlottesville?

Charlottesville has long grappled with its history of race and discrimination, a debate that was intensified by the nationalist rally in August 2017.

A previous city council vote to remove a statue of Confederate General Robert E Lee was the flashpoint for fervid white nationalist protests, culminating in the deadly rally.

"The events of August 2017 have challenged Charlottesville to confront its history and to acknowledge that this community has not always embraced all of our citizens as equals," the council said when they enacted the new holiday.

In May, a Virginia judge ruled that Charlottesville's Confederate statues are war memorials protected by state law and cannot be removed.

Hundreds of statues of Lee, General Thomas "Stonewall" Jackson and other famous figures of the Confederacy - the southern states that revolted against the federal government - exist all throughout the US.

Image copyright Ty Wright/Getty Images Image caption Statues of General Thomas "Stonewall" Jackson and other confederate leaders continues to spark debate in Virginia

Some see the memorials, as well as Confederate flags, as markers of US history and southern culture. Others view them as an offensive reminder of the country's history of slavery and racial oppression.

The decision to jettison celebrating Jefferson's birthday in favour of an emancipation holiday has also divided the city. Supporters say that black history should be made more visible, but opponents argue that it is an erasure of history.