"Democracy has won," says opposition as court orders vote recount