LIMA, Peru (AP) _ The Interior Ministry and a leftist senator said Monday that 13 peasants were killed by police in a battle last week at an isolated village, but they gave different accounts.

In another report, police in Ayacucho province said guerrillas of the Maoist Shining Path movement killed 13 peasants and wounded five in weekend attacks on two mountain hamlets where residents had formed defense patrols.

The conflicting versions involved a Sept. 17 police action in the village of Ayaorco in Apurimac province.

Sen. Enrique Bernales, a member of the United Left opposition coalition, told the newspaper La Republica 10 Civil Guard police opened fire on peasants attending a birthday party.

The newspaper quoted Bernales as saying he was told of the massacre because two of the peasants killed were members of his Revolutionary Socialist Party.

''It was a party given among two humble peasant families who had nothing at all to do with terrorism,'' Bernales told La Republica.

An Interior Ministry statement published Monday confirmed the Ayaorco deaths, but said the 13 people killed were Shining Path guerrillas and one policeman was wounded. It said guerrillas clashed with a police patrol that was searching for rebels believed to have beaten a local Health Ministry official and his driver.

The statement said that because of the different versions, the ministry has ordered that a committee with representatives from Peru's three police forces go to Ayaorco to investigate.

In July, a civil court in Ayacucho, 230 miles southeast of Lima, convicted 11 Civil Guard police of killing 41 peaple who were participating in a festival in the village of Soccos in Ayacucho province in 1983. The defendants were given prison sentences ranging from 10 to 25 years.

It was the first time since the Shining Path launched its guerrilla war in Ayacucho province six years ago that members of the security forces were convicted of killing civilians in the anti-insurgency campaign.

Police and other officials in Ayacucho reported the weekend attacks by guerrillas on two villages in rural La Mar district.

They said about 80 rebels armed with knives and guns attacked the hamlet of Cochas early Saturday, killing eight peasants and wounding five.

In a Friday night raid on the Chinchibamba, more than 50 guerrillas shot to death five peasants, including the leader of the local defense patrol, according to the officials.

They said that before leaving the village, the guerrillas painted slogans on the walls calling on soldiers and peasants to ''join the armed fight by killing your leaders.''

Eulogio Quispe, one of the five peasants wounded in Cochas, told The Associated Press in Ayacucho that the guerrillas attacked the village to punish the residents for forming a government-organized defense patrol.

He said the patrol was established in Cochas, which has some 150 residents, on orders from military units operating in the area.

The rebels attacked after dark, killed any villager who resisted, and then set fire to several buildings and stole food and livestock before fleeing into the surrounding hills, Quispe said.

Officials say at least 10,000 people have been killed in the war between the guerrillas and security forces.