The PQ has said it would seek a transfer of powers from the federal government in areas like employment insurance and immigration policy. If those measures are rejected, the party believes it would have a stronger case for independence.
Without a majority in the Quebec Assembly, however, the PQ will need to work with other parties to pass legislation, and the results will undermine efforts to quickly hold a referendum on separation.
The PQ had just under 31 percent of the vote and 54 seats in the provincial legislature, falling short of a majority in the assembly. The Liberals had about 31 percent and 50 seats.
A new party, Coalition Avenir Quebec, followed with 27 percent and 19 seats. The separatist Quebec Solidaire party won 2 seats.
A party needs to obtain 63 of the 125 seats to form a majority.
Before the shooting incident, Charest, who lost his own assembly seat, had congratulated Marois for becoming Quebec's first woman premier. He noted that she would be leading a minority government and said the results speak "to the fact that the future of Quebec lies within Canada." He did not indicate whether he intended to step down as Liberal leader after the defeat.
Earlier, Harper congratulated Marois on her victory but said he did not believe the results meant most Quebecers favor separation.
"We do not believe that Quebecers wish to revisit the old constitutional battles of the past," Harper said in a statement.
Harper's office had no immediate reaction to the shooting at the Parti Quebecois rally.
Although a number of candidates from the smaller parties are separatists, a minority government means "the more radical things in the party platform are going to be dead on arrival," said Bruce Hicks, a political science professor at Concordia University in Montreal.
Charest called the election more than a year before he had to, citing unrest in the streets due to this spring's student protests over tuition hikes. The most sustained student protests ever to take place in Canada began in February, resulting in about 2,500 arrests.
Marois, 63, was first elected to Quebec's National Assembly in 1981. She retired in 2006 but returned to become PQ leader a year later after her predecessor lost to Charest in an election that landed the PQ in third place. She in turn lost to Charest in 2008.
There has been an unusual series of high-profile shootings in Canada this year, including one at a busy Toronto shopping mall popular with tourists. Canadians have long worried that U.S.-style gun violence could become more common.
It's not the first time there has been political violence in Quebec. In the 1970s Canadian soldiers were deployed because of a spate of terrorism by a group demanding independence from Canada. In 1970, the militant FLQ demanded "total independence" from Canada. Its members kidnapped and killed Quebec's labor minister and later abducted, then freed, a British diplomat.
The subsequent "October Crisis" was considered one of the darkest periods in modern Canadian history. Canadian troops patrolled the streets of Quebec and jailed alleged FLQ sympathizers, most of whom were later found innocent of having any FLQ ties.
Gillies reported from Toronto.
Copyright 2012 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.