BELGRADE, Yugoslavia, Oct. 1— In an atmosphere of rising ethnic tension, Serbs in the Yugoslav republic of Croatia today declared the republic's predominantly Serbian-populated counties to be autonomous.

The declaration, based on the results of a vaguely worded referendum on Serbian autonomy conducted throughout Yugoslavia over the last two months, was signed by Milan Babic, a local politician who heads the Serbian National Council, a Yugoslav press agency report said.

More than 99 percent of the approximately 750,000 participants in the referendum voted for autonomy, the report said. Serbs officially account for 11.5 percent of Croatia's 4.7 million people, but any Serb born or living in Croatia was allowed to vote.

The autonomy declaration comes after a weekend of unrest in Croatia's Serbian-populated counties that has set off a storm of criticism across Serbia. Extreme nationalist opposition political figures in Serbia threatened today to form paramilitary units ''to defend'' the Serbs in Croatia if the Yugoslav Government does not do so.

The unrest began after special Croatian police units began confiscating arms and ammunition from police stations in Serbian-dominated areas and from weapons depots belonging to units of Yugoslavia's territorial defense organization, a kind of national guard.

On Friday night, a group of Serbs broke into an arsenal in a police station in the town of Glina and made off with weapons.

Croatian riot policemen using tear gas clashed with the crowds in several predominantly Serbian-populated towns on Saturday. A police officer and a civilian suffered gunshot wounds.

Late Sunday night, an anonymous group based in Knin, an almost completely Serbian-populated Croatian town, blocked area roads and rail lines in reaction to the police detention of Serbs for illegal weapons possession and disorderly conduct, a press agency report said. In a statement released today, the group gave the Croatian authorities an ultimatum to release the detainees, the report said. Barricades still blocked several main roads tonight, radio reports said.

Croatia's government has repeatedly said that the Serbs' referendum is illegal and asserted that the actions of the republic's Serbian minority are an effort to undermine Croatia's democratic order and deflect attention from Serbian police repression against ethnic Albanians in that republic's Kosovo region.