The Vata pagan uprising was a Hungarian rebellion which in 1046 brought about the overthrow of King Peter Urseolo, the martyrdom of Bishop Gerard of Csanád and the reinstatement of the Árpád dynasty on the Hungarian throne.
Christianity had been introduced in Hungary by the King Stephen I of Hungary. Upon his death in 1038, he was succeeded by his sororal nephew Peter Urseolo, a Venetian noble. Through tax increases, and Urseolo's involvement with foreign powers, he proved to be an unpopular ruler. The Hungarian peasants, still largely pagan, suspected he was intent on bringing Hungary into the fold of the Holy Roman Empire. In a rebellion in 1041, Stephen's brother-in-law Samuel Aba took control of the throne, overthrowing Urseolo. Urseolo fled to Bavaria, in exile allying himself with German king and Holy Roman Emperor Henry III.
In the years that followed, Aba's reign weakened, likely due to opposition from the church, who disliked his catering to pagan beliefs. With support from Henry, Peter Urseolo returned to Hungary in 1044, defeating Aba at the Battle of Ménfő. Urseolo regained the throne, but Hungary was no longer independent; it became a vassal kingdom of the Holy Roman Empire. However, his second reign would prove to be even more short-lived than his first.
Andrew (András in Hungarian), Béla and Levente were the sons of Vazul, cousin of Saint Stephen. During the reign of Samuel Aba, they had fled the country in fear of their lives, Béla to Poland and András and Levente to Kiev. In 1046, András and Béla returned to Újvár (today: Abaújvár) in Hungary from their exile and quickly gained popular support for the throne, especially among the pagan populace, despite the fact that András was Christian (Levente had remained pagan). On their return, a rebellion began, which András and Levente initially supported.