Hungary has a long and complex history, which must be examined to answer this question in full.
The foundations of the Hungarian state were established in 895 AD when the Magyars, led by Prince Arpad, conquered the Carpathian Basin. In 1000, the area became a Christian kingdom and St. Stephen, a descendant of Prince Arpad and the first Christian king of Hungary, expanded his region of control. At this time, Hungary was one of the largest states in Europe.
In the 16th century, Ottoman Turks defeated Hungarian forces at the Battle of Mohacs and established control over the majority of the country. It was then taken by the Hapsburgs from the Turks towards the end of the 17th century.
The country gained autonomy from the Hapsburgs in 1867 when it became an equal partner in the Austro-Hungarian Empire.
In 1918, with the end of WWI, the Austro-Hungarian Empire is broken up and a Hungarian republic is declared.
In 1949, Hungary is falls under communist control and popular uprisings are suppressed for decades until a multi-party democracy replaced Communism in 1989.
On the 23rd of October, 1989 the Hungarian Republic was proclaimed and Hungary has been a member of the EU since 2004.