sentences:  The capital of the county was Balassagyarmat, except for the 18th century, when the capital was Losonc.Nógrád was one of the first counties of the Kingdom of Hungary, founded in the 11th century.It was ruled by the Ottoman Empire from 1541 to 1595, and from 1605 to 1686, as part of Budin Province and Eğri Province.