(CNN) Sri Lanka has defied the global trend in the battle against measles, with the country declared free of the highly infectious disease by the World Health Organization on Tuesday.

The country reported its last homegrown case of the virus in May 2016, WHO said in a statement. Sporadic cases reported in the last three years were imported from abroad but were quickly detected, investigated and received a rapid response, WHO added.

"Sri Lanka's achievement comes at a time when globally measles cases are increasing," Dr. Poonam Khetrapal Singh, regional director WHO South-East Asia, said in a statement.

"The country's success demonstrates its commitment, and the determination of its health workforce and parents to protect children against measles," she said.

The highly contagious viral disease has made a comeback across the globe -- in high-income countries in the Americas and Europe, as well as in some low- and middle-income countries in Asia and Africa -- fueled in part by fear of and lack of access to vaccines, and complacency.