Mexican media reported that the attack on the bar in Tabasco took place around 8:00 pm. (File)

Five people were shot dead in a bar in the home state of Mexican President Andres Manuel Lopez Obrador a few hours before he was due to lead his first independence day celebrations on Sunday night.

The public security ministry said in a post on Twitter that five people were killed and three were injured when a group of unidentified gunmen opened fire in the bar near Villahermosa, the state capital of Tabasco in southeastern Mexico.

The killings were the latest reminder of the chronic security problems faced by Lopez Obrador, a veteran leftist who assumed the presidency in December pledging to bring down soaring levels of violence in Mexico.

Since then, the bloodletting has continued and the 2019 murder tally is on track to surpass last year's record total.

An hour before midnight, Lopez Obrador performed his first 'Grito' (Cry) as leader from the balcony of the presidential palace in the center of Mexico City, an event which commemorates the call to arms by rebel priest Miguel Hidalgo on September 16, 1810 at the start of the country's war of independence from Spain.

Addressing a packed Zocalo, the city's main square, Lopez Obrador chose to deliver 20 cries of "viva!" in his salute to independence, among them, "viva la paz!", or "long live peace!"

Mexican media reported that the attack on the bar in Tabasco took place at around 8:00 pm local time.

The motive was not immediately clear.