This week, US President Joe Biden signed the Juneteenth National Independence Day Act, which establishes a holiday that commemorates the end of slavery in the country.

At the signing event, he said: "I've only been president for several months, but I think this will go down, for me, as one of the greatest honours I will have had as president.”

Juneteenth marks the occasion - on 19 June 1865 - months after the northern US states defeated the South in a civil war fought over slavery – when enslaved African-Americans in Galveston, Texas, were told they were free. Subsequently, the day became known as Juneteenth (a word created by joining the words ‘June’ and ‘nineteenth’ together).

The liberation of enslaved people in Texas came more than two and half years after President Abraham Lincoln issued the Emancipation Proclamation, declaring all enslaved people in the rebellious states to be free. The declaration by General Grainger to bring the Emancipation Proclamation into effect in Texas is seen by many as the end of slavery as it finally brought the practice to an end in the last state still holding the enslaved.

A national holiday in the US, 49 states and Washington DC formally recognise Juneteenth as a state or ceremonial holiday. As Senator of Illinois, Barack Obama co-sponsored legislation to make Juneteenth a national holiday, but the law was never passed - even after he became president.

This year, companies including Nike, Uber, Twitter and many others announced that they are giving their employees a paid day off for Juneteenth, with Governors in some states, including New York and Virginia, also declaring it a holiday for state employees. The US House of Representatives backed the legislation by 415-14, a day after it was unanimously approved by the Senate. With the signature of President Biden, it has become law.

It is the first new federal holiday since Martin Luther King Jr Day was established in 1983.

The effort to have Juneteenth declared a federal holiday was decades in the making. In 2016, 89-year-old Opal Lee walked from Texas - where Juneteenth has been a state holiday since 1980 - to Washington DC in an effort to encourage lawmakers.

She walked 2.5 miles (4km) each day - representing the two and a half years that it took for enslaved people in Texas to learn that they had been freed. "I've got so many different feelings all gurgling up in here," Ms Lee said after Congress approved it as a federal holiday.

"I don't know what to call them all. I am so delighted to know that suddenly we've got a Juneteenth. It's not a Texas thing or a Black thing. It's an American thing."

The ending of slavery did not do away with racism, and in the years after so-called Jim Crow laws were created to separate Black people from white society and limit their civil rights. The legacy of those laws is still being dismantled.

The death of George Floyd, Breonna Taylor and other African-Americans at the hands of police have led to anti-racism protests by followers of the Black Lives Matter movement. In addition, some Democrats argue that recent Republican state election reforms making it harder to vote are an effort to disenfranchise minority voters who often lean Democratic.

Last year, former president Donald Trump postponed an election rally originally planned for June 19 after facing criticism amid nationwide anti-racism protests. It also comes as a fierce cultural debate rages over the history of slavery and how it should be taught in American schools.

Some Republican-controlled states have sought to have schools teach the so-called ‘patriotic education’ favoured by Trump, and limit or prohibit curriculums that seek to re-examine the importance of slavery to the foundation of the country.

Juneteenth celebrations are now also being marked outside of the US as the Black American Expat Community, in the United Arab Emirates, wishing a Happy Juneteenth to everyone who celebrates the freedom of African Americans in 1865.

“We represent our ancestors with great pride,” a spokesperson said, “as we enjoy the hard-won freedom to pursue our goals and experience all the world has to offer here in the UAE.

“We stand with our Stateside Brothers and Sisters in the continued fight for our civil rights and contribute to the development of a global world in which we can all live without the burden of discrimination.”