WASHINGTON — The director of the U.S. Census Bureau is resigning, leaving the agency leaderless at a time when it faces a crisis over funding for the 2020 decennial count of the U.S. population and beyond.

John Thompson, who has served as director since 2013 and worked for the bureau for 27 years prior to that, will leave on June 30, the Commerce Department announced Tuesday.

The news, which surprised census experts, follows an April congressional budget allocation for the census that critics say is woefully inadequate.