In a match which saw 44 minutes of penalties and as much clutching and grabbing as passing and shooting, the Ukraine used all the physical might they could muster to see off the Swiss.
The plan worked to perfection as the Ukraine, competing in Olympic ice hockey for the first time, jumped out to a 2-0 lead on goals by Valentyn Oletsky and Ruslan Fedotenko.
Sandy Jeannin got one back for the Swiss before the end of the first period.
But Sergei Varlamov made it 3-1 less than two minutes into the second frame.
The Swiss closed the gap to one with Ivo Ruthemann's power play goal but that was as close as they would get.
Ukraine scored two more goals while holding off a last period push by Switzerland.
Switzerland, without a victory from their two games so far, now only have a remote chance of qualification.
Elsewhere, Belarus became the first team to advance to the final round with a 3-1 win over France.
Belarus can now do no worse than tie Ukraine with four points after the third and final game.
They would advance, however, on the strength of their 1-0 win over Ukraine on Saturday.