BEIRUT, Lebanon — Rebels in southern Syria killed more than 20 people in a mortar attack on a tent put up as part of presidential elections next month, antigovernment activists said on Friday.

The overnight attack appeared to be the first by opponents of President Bashar al-Assad directly targeting the election and raised the specter of further rebel assaults on rallies and other events.

The vote, scheduled for June 3, will almost certainly grant Mr. Assad another seven-year term. Mr. Assad’s supporters have trumpeted the election as an expression of the popular will, while the United States and the Syrian opposition have dismissed it as political theater.

The Syrian government has not made clear how it plans to collect votes in the vast areas of the country beyond its control, nor how the millions of refugees in neighboring countries will make their voices heard.