Hackers targeted the Draugiem.lv network, second in popularity only to Facebook in the Baltic state, with a pro-Russian message.
"Comrades Latvians, this concerns you. The borders of Russia have no end," it said in Russian, followed by images of unmarked Russian soldiers in green uniforms annexing Crimea, Russian tanks parading in Moscow and a smirking Vladimir Putin.
"We expected such incidents during the election day," Foreign Minister Edgars Rinkevics told news agency LETA, adding investigations were under way.
Polls have suggested the governing centre-right coalition has lost ground despite righting the economy after the 2008 financial crisis.
After casting his ballot, President Raimonds Vejonis called on fellow Latvians to come to the polls, pointing to the Brexit vote as an example of what might happen if they didn't.
"It shows us that we should not stay at home and that we should express our opinions," he said.
But with three hours to go, turnout was low at 39.06 percent, according to the election website.
Latvia is a member of both the eurozone and NATO, having joined the military alliance in 2004.
Latvia's ethnic Russian minority makes up about a quarter of the country's 1.9 million population and the pro-Kremlin Harmony party, which was formerly allied with Putin's United Russia party, is popular with them.
The party has won the largest number of votes in the last three elections, and did not enter government only because it failed to attract coalition partners.
But this time could be different.
'Red October'
Along with fellow Baltic states Estonia and Lithuania, Latvia declared independence in 1918 after the Tsarist Russian empire collapsed.
But it was occupied by Nazi Germany during World War II, and then by the Soviet Union for nearly half a century until 1991.
After the last election in 2014, the centre-right Greens and Farmers Union, the right-wing National Alliance and the centre-right Unity formed a three-party coalition to run the country.
But polls suggest that voters are abandoning the ruling coalition.
"Voters want new faces: the current ministers cannot offer anything entertaining," political scientist Filips Rajevskis told AFP.
The established parties tried to bring in fresh blood, but that tactic did not appear to have worked, he said.
"Therefore there's the possibility of a Russia-oriented coalition after the election."
Casting his ballot in the eastern town of Rezekne, Aigars Karklins said the prospect of Harmony teaming up with populists was realistic.
"I am going to make my choice for Latvia as part of the EU and NATO, and I hope most of us will do, otherwise this election will be remembered as the Red October," he told AFP.
'No red lines'
Polls suggest the Greens and Farmers Union, which currently holds the posts of both president and prime minister, will win no more than 15 seats in the 100-seat parliament.
The National Alliance is expected to win 13 and Unity, now rebranded as New Unity, might not even meet the five-percent election threshold.
Harmony meanwhile has signed on some high-profile ethnic Latvians as their frontrunners, and is on track to come out ahead with at least 28 seats.
And this time, after a decade of trying, the party may finally manage to form a government by joining forces with newcomer populists.
KPV LV, a populist party led by former stage actor Artuss Kaimins, is a potential coalition partner. The party could win at 15 seats or more.
Kaimins was briefly detained over alleged corruption in June, but that does not appear to have bothered voters.
And the party's candidate for prime minister, lawyer Aldis Gobzems, recently suggested they were open to working with other parties.
"KPV LV can work with anybody, we don't have any red lines regarding any other political force," Gobzems said during a TV24 debate.
A total of 16 parties are on the ballot. Polling stations are open until 1700 GMT on Saturday, with exit polls soon after and results expected early Sunday.