Otto Perez Molina has declared a national alert and advised people to evacuate tall buildings as a precaution.
Officials said landslides had buried roads and it would take 24 hours to restore links to the quake-hit area.
Frightened people fled from offices and homes around the region, as buildings shook from Mexico City to San Salvador.
Quake officials said the tremor hit at about 10:35 local time about 23 km (15 miles) from the Guatemalan town of Champerico.
Otto Perez Molina said so far three people had been confirmed dead.
“Other preliminary information, which has not been confirmed, says the number of dead could rise to around 15 people,” he said.
He added that another 15 people were believed to be trapped under ground and about 100 people were missing.
Other officials gave higher casualty figures.
Aroldo Rivera, governor of San Marcos, the worst-affected region, was quoted as saying 29 people had been confirmed killed and 155 injured.
Firefighters earlier said a school had collapsed in San Pedro Sacatepequez in San Marcos region.
The firefighters later said at least eight people had been killed, though it was not clear if the deaths were related to the school collapse.
The US Pacific Tsunami Warning Center said in a statement there was no threat of a destructive widespread tsunami.
But it added: “Earthquakes of this size sometimes generate local tsunamis that can be destructive along coasts located within a hundred kilometres of the earthquake epicentre.”
The region is often hit by quakes, which have periodically caused huge damage and many deaths.
hFLzmSFxRTg ainCg_1Li8IImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…