Guyana’s fragile multiracial coalition government fell after a no-confidence vote in the National Assembly late Friday, setting off a general election campaign nearly two years before President David A. Granger’s constitutional term is complete.

The surprise collapse comes less than four years after a coalition of Indo-Guyanese and Afro-Guyanese politicians, promising a new style of inclusive politics, defeated a party that had held power for more than two decades.

A retired military commander, Mr. Granger has had trouble controlling a fractious cabinet and has been slow in putting together a regulatory and environmental framework to prepare the country for the first commercial production of oil, scheduled in 2020.

The discovery of oil by Exxon Mobil off Guyana’s Atlantic coast in recent years promises to transform the economy of the English-speaking South American country of 750,000 people. But even advisers to the government have warned that with the county’s history of corruption, Guyana risks squandering billions of dollars in annual revenue from taxes and royalties.