The rocket was due for lift-off shortly, and was in its jungle launch site at the Alcantara space base.
Some 20 people were seriously wounded in the explosion on Friday, which sent a huge plume of smoke into the air above the tropical headland sticking into the Atlantic Ocean where the launch base is situated.
"Nineteen people died and there are about 20 seriously wounded," said Raimundo de Souza, a Public Security spokesman for the northeastern state of Maranhao.
Both civilians and military officials were killed, he said.
Television showed amateur footage of smoke billowing far into the sky. The explosion was heard dozens of kilometres away in the town of Sao Luis.
October 1960 - 91 people are killed when an R-16 rocket explodes at the Baikonur space center in Kazakhstan in the Soviet Union.
January 1967 - Three US astronauts - Virgil Grissom,
Roger Chaffee and Edward White - die in a "flash fire" aboard Apollo 1 during a simulated launch at Cape Canaveral.
January 1986 - Seven US astronauts including a
schoolteacher die aboard the Challenger space shuttle 72 seconds after lift-off from Cape Canaveral.
June 1997 - Russia's Mir space station carrying two
Russian cosmonauts and one American collides with a cargo ship. Crew narrowly escape death as oxygen rushes out of Mir.
February 2003 - The space shuttle Columbia, carrying seven astronauts breaks up over Texas on re-entering atmosphere at end of 16-day flight.
Officials said the rocket was not in the process of being launched when it blew up.
There was no immediate explanation for the cause of the blast at the base where roughly 800 people were preparing the $6.5 million, 20-metre rocket for its scheduled launch next week.
It was sitting in a large structure on the launch pad at Brazil's tropical Alcantara space base on a jungle peninsula jutting into the ocean when the accident happened at 1330 local time (1630 GMT).
Brazil had been hoping to make the first successful venture into space by a Latin American nation.
Rockets launched by Brazil in 1997 and 1999 were destroyed shortly after lift-off because of technical problems.
Experts have been working since the beginning of July to assemble the so-called Satellite Launch Vehicle.
The rocket was going through final tests up till 24 August after which officials at the base said it would have been ready to initiate the launch sequence.
Officials said this week the run-in had been trouble free.
The rocket was to have transported two small satellites, carrying positioning equipment, a communications transmitter and energy source.
They were to have been released into low orbit about 750 km above the Earth less than eight minutes after blast-off.