LONDON β€” Britain's defense ministry says Prince Harry has qualified to command an Apache attack helicopter β€” the culmination of his training over the last three years.

Harry, known as Capt. Wales in the army, earlier this year completed a 20-week deployment in Afghanistan as a co-pilot gunner on an Apache and since then has flown missions in the U.K.

His commanding officer, Lt. Col. Tom de la Rue, called the qualification a "tremendous achievement," saying in a statement Friday that 28-year-old Harry had passed with "flying colors."

The military said Harry had undergone months of training to prepare for the test, which involved a "grueling" six-hour flying assessment which took him all over the U.K. and required him perform a variety of tasks including simulating a low-level attack.