Defense Secretary Chuck Hagel says the Pentagon plans to more than triple its cybersecurity staff in the next few years to defend against computer-based attacks.

Hagel's comments Friday at the National Security Agency headquarters in suburban Washington come as he prepares to visit China next week, where officials are likely to challenge him amid reports of aggressive U.S. cyber spying.

The Pentagon has been recruiting outside talent for cybersecurity jobs as well as encouraging people already in the military to train for them and will have some 1,800 professionals by year's end. Hagel says that will grow to 6,000 in 2016.

Hagel says the nation's use of has outpaced the security developed for it.