At least 25 people have been killed by electric shock in a wedding in eastern Saudi Arabia, civil defence officials and local media say.

Celebratory gunfire brought down an electric cable at a house in Ain Badr village where the wedding was held on Tuesday night, Abdullah Khashman, an Eastern Province official, said.

Thirty others were injured in the incident near Abqaiq, a centre of the Saudi energy industry.

Some Saudi media reports said the blaze erupted inside a tent, killing at least 23 women and children. The kingdom's conservative codes require genders to be separated at most public events, including weddings.

The media cited civil defence officials as saying that celebratory gunfire brought down a power line that touched off the fire.

However, Reuters news agency quoted Khashman as saying: "At the wedding, the cable fell on a metal door and the 23 people who died were all electrocuted."

The victims were reportedly trying to escape through the door, the only exit from the courtyard, when they were killed.

All those killed were from the same tribe, Khashman said.

Saudi Arabia last month banned the shooting of firearms at weddings, a popular tradition in tribal areas of the country.

Prince Mohammed bin Fahd, Eastern Province's governor, ordered an investigation into the incident, the official Saudi Press Agency reported.

In July 1999, 76 people died in a similar incident in the Eastern Province.

Forty-three women and children were killed at a wedding in neighbouring Kuwait in 2009 when a fire engulfed a tent.

The ex-wife of the groom said she started the fire to avenge her former husband's "bad treatment" of her.