BUDAPEST, Hunary (AP) _ About 10,000 people chanting ''Democracy 3/8 Democracy 3/8'' marched through the streets of this communist capital Tuesday and called for a free press and free elections.

Police turned out in force, but took no action as protesters yelled anti- government slogans and speakers criticized the Soviet system.

The throng marched several miles down Budapest's main boulevards, blocking traffic and waving red, white and green Hungarian flags.

The unofficial protest followed a rally organized earlier in the day by the Communist Party to mark the anniversary of Hungary's abortive 1848 revolution against Austria, one of this East European nation's biggest holidays.

''The time is over for self-appointed governments,'' prominent dissident Gabor Miklos Tamas told the throng, in a reference to the nation's communist authorities. ''A modern democracy has to be created with a new constitution and free elections.''

The crowd marched to monuments of Hungarian national heroes and paid particular tribute to firebrand poet Sandor Petoefi, whose name is symbolic of resistance to foreign suppression in Hungary.

Protesters chanted ''Democracy 3/8 Democracy 3/8'' and waved banners reading, ''We want real reforms'' or ''We demand freedom of the press.''

Later Tuesday night, a crowd of about 1,500, most of them young people, gathered at the Petoefi monument and then moved across the Margaret bridge to the Castle Hill, where they repeated calls for democracy and press freedom.

About 150 people then moved back to the Chain bridge, intending to return to the Petoefi monument, but witnesses said the demonstrators were dispersed by waiting riot police, who held clubs but did not hit anybody.

Hours after the unofficial demonstration was over, the state news agency MTI reported that eight people, mostly dissident intellectuals, were arrested. The five-line report gave only their names.

They were writer Miklos Haraszti, sociologist Ottlia Solt, publisher Gabor Demszky, artist Tamas Molnar, Gyoergy Gado, Jenoe Nagy and two lesser known dissidents, Sandor Racz and Robert Palinkas.

Haraszti later said he had been released and that he assumed the others had also been set free, but this could not be confirmed immediately.

Hungarian dissidents have staged unofficial demonstrations on March 15 since 1973. Police generally have shown restraint, although dozens of officers clashed violently with protesters in 1986.

Hungary has won a reputation as a relatively liberal Soviet bloc country, although far less dissent is tolerated than in Western countries.

At Tuesday's rally, groups of protesters whistled and applauded rhythmically as police vehicles passed by, but authorities did not react to what appeared to be attempts to provoke them.

Roza Demszky, the wife of one of the arrested dissidents, read her husband's speech to the crowd.

The Soviet system has led Hungary into a crisis ''and does not show any way out,'' she said.

The reforms promised by the Hungarian revolution of 1848 ''have not yet been realized in this country,'' she added.

Speakers gathered at a monument to Lajos Kossuth, the leader of the 1848 revolt, to read poems by Petoefi.

In the earlier official rally, a crowd of 5,000 people gathered near Budapest's National Museum, where the 1848 revolution first began.

Communist Party speakers called for more national unity and economic progress, and laid a plaque commemorating the revolution.

Small groups dressed in folk costumes sang national songs and told events of the aborted revolution.

Hungary recently has imposed an austerity program to try to reverse economic stagnation, and its leadership is contemplating political reforms.