WASHINGTON (Reuters) - U.S. Secretary of Defense James Mattis this week asked Congress to halt pending legislation that would compel the U.S. to alert foreign governments when the Pentagon has decided to combat certain cyber attacks, according to a letter sent to lawmakers.

FILE PHOTO: U.S. Secretary of Defense James Mattis testifies before a Senate Armed Services Committee hearing on the "Political and Security Situation in Afghanistan" on Capitol Hill in Washington, U.S., October 3, 2017. REUTERS/Aaron P. Bernstein

The letter, sent to members of Congress on Tuesday and seen by Reuters, comes as lawmaker’s finalize the Department of Defense’s 2018 spending plan, also known as the National Defense Authorization Act for fiscal year 2018, or NDAA.

“The nature of cyber-attacks is ever evolving, and we need to maintain our ability to take decisive action against this increasingly dangerous threat,” Mattis wrote.

Language in a draft of the NDAA says that when a cyber attack transits a third party country’s infrastructure or relies upon its networks the U.S. should encourage that nation to take action to eliminate the threat. However, the draft NDAA say the U.S. reserves the right to act unilaterally if needed.

Mattis’ letter, dubbed the “heartburn” letter because it highlights the Pentagon’s concerns with the budget, has often been used by previous Pentagon chiefs to attempt to influence lawmakers’ legislation while it is still under consideration.

In the letter, Mattis repeated an earlier request to Congress that they consider closing bases in 2021, for an estimated savings of $2 billion annually. Congress, fearful of the economic impact from base closings in their districts, are generally not sympathetic to those efforts.

Mattis also said he opposed the formation of an additional military service dubbed Space Corps, which he called an “additional organizational layer.” Space Corps would be a new military branch and absorb the Air Force’s military efforts in space.

The U.S. Senate passed its version of a $700 billion defense policy bill in September backing President Donald Trump’s call for a bigger, stronger military but setting the stage for a battle over government spending levels.

The House of Representatives passed its version of the NDAA at a similar spending level in July.

The two versions are now being reconciled before Congress can consider a final version. A fight over spending is expected because Senate Democrats have vowed to block big increases in funds for the military if spending caps on non-defense programs are not eased as well.

The two versions of the bill increase military spending well beyond what current spending caps allow.