The first written reference to village comes from 1002. King Stephen I gave village Wag (later Dyaquai) as a present to abbacy of Benedictine monastery in Pannonhalma.
We learn about the existence of Church of Virgin Mary from the bull of the Pope Pascal I of 1103. It could be a small single-nave church with apse in form of horseshoe that is preserved to these days next to the church as a lateral chapel of St. Stephen.
On the orders of the Pope Gregory IX a new Church of Virgin Mary with three naves was consecrated on 14 November 1228 by bishop of Nitra Jacob. Written reference to this event can be found in the deed of Pray Codex from period between 1192 and 1195, used and probably also made in monastery of Diakovce.
Two-floor building of the more recent Romanesque church is divided into upper and lower church, what is a unique solution in our conditions, exceptional also on a European scale. Disposition of three-nave building is on the eastern side terminated with trio of apses, on the western side there used to be a matroneum and two towers of westwork type. While there is no doubt regarding the use of lower part, utilization of the floor is not clear. Lateral naves segmented into smaller areas probably served as cloisters for monks. The central nave, opening into apse on the east, could have a cult purpose. Buildings forming part of monastery’s premises probably used to stay around the church.
Romanesque towers were elevated in Baroque period, at the end of the 18th century. Between 1872 and 1875 a three-nave Neo-Romanesque basilica was additionaly built to western part of monasterial church according to the project of Friedrich Schulek, making follow-up on preserved Romanesque morphology. Romanesque matroneum and bottom part of western facade were demolished because of the interconnection of new and old area. Spiral staircase leading to upper church and sacristy were added to the northern tower.
An extensive reconstruction of the church was realized between 1940 and 1941, mainly of interior equipment, including interior paintings. The last restoration was carried out in 1990s.
Romanesque monasterial church is preserved in almost original extent including the more ancient church on the southern side. Typical construction elements of Romanesque style are visible on facades, as ribbed frieze, round frieze and blind arcades.