Even as spending is being slashed across the military, a battle over billions of defense dollars is underway at Bedford’s Hanscom Air Force Base, where Waltham-based Raytheon and Maryland’s Lockheed Martin are fighting to win the right to create a first-of-its-kind “space fence” to track orbital junk.

US Air Force officials, with the help of engineers at nearby MIT Lincoln Labs and the government-funded, Bedford-based Mitre Corporation, expect to pick one of the companies’ designs this summer for a powerful radar system to track more of the estimated half a million pieces of man-made debris that imperil weather forecasting, navigation, and communication satellites. Even the International Space Station recently had a pair of close calls with space debris, requiring astronauts to scramble to escape pods.