HALIFAX, Canada — The U.S. military needs Congress to provide sustained defense spending to maintain its eroding military edge against Russia and China — but also needs to start innovating, its top uniformed officer said Saturday.

Joint Chiefs Chairman Gen. Joseph Dunford’s remarks at the Halifax International Security Forum came days after a National Defense Strategy Commission report concluded the U.S. would, “struggle to win, or perhaps lose, a war against China or Russia.”

Citing that report, Dunford said whoever is in his job in 2023 and beyond will be at a disadvantage — “if we don’t change the trajectory we have been on, if we don’t have sustained, predictable, accurate levels of funding, if we don’t look carefully at the areas where we are challenged — in space, in cyberspace, in the maritime domain.”

Dunford offered some caveats: U.S. alliances would provide a decisive advantage in any major conflict. The U.S. would not lose a war with Russia or China, but such a war would be lengthy. And the U.S. has the edge today.

With an eye toward Russian and Chinese technological advancements, the 2020 budget will invest heavily in research and development, in line with Defense Secretary Jim Mattis’ priorities, Dunford said, to strike a “balance” with traditional capabilities like ships and manned aircraft.

Asked if U.S. defense spending’s growth is economically sustainable, Dunford said, “I reject where economically we can’t be competitive.”

“It isn’t just a question of money, it’s a question of money, technology, ideas and doing things in totally disruptive ways,” he said, adding: “We can’t buy our way out of many of the challenges we have, we have to think our way out of them.”

The Pentagon has identified the 14 technological areas where Russia and China are investing, projected where they will be in 2025 and which technological areas require investment from the U.S. and its allies, Dunford said.

Yet the Pentagon has had some hiccups in attempts to partner with Silicon Valley innovators. Asked about Google’s recent abandonment of Project Maven, a Pentagon project involving using machine learning to distinguish people and objects in drone videos, Dunford hit back.

“Without highlighting any specific company, I have a hard time with companies that are working very hard to engage the market inside of China — where intellectual property is shared with the Chinese, which is synonymous with sharing it with the Chinese military — and don’t want to work with the U.S. military” Dunford said.

“We are the good guys, and the people in this room that stand for democracy are the good guys, and the relationships the military has had with industry go back to World War II,” Dunford said.

The remarks, especially on defense spending, are sure to echo to Washington ahead of a fiscal 2020 defense budget season. Downward pressure is expected from the Democratic-led House, and the White House has already ordered a budget cut for national defense, from a planned $733 billion to $700 billion.

Earlier this month, White House National Security Adviser John Bolton called the national debt “a threat to the society” and said Pentagon spending will “flatten out” in the near term.

The U.S. defense industry has pushed back against potential cuts. Citing the National Defense Strategy Commission’s report, defense hawks in Congress have, too.

Earlier this week, Senate Armed Services Committee Chairman Jim Inhofe, R-Okla., said defense funding needs to be able to “undertake essential nuclear and conventional modernization while rectifying readiness shortfalls.”

“That is why I believe the $733 billion defense budget originally proposed by President Trump for fiscal year 2020 should be considered a floor, not a ceiling, for funding our troops,” Inhofe said in a statement.

Last year, Mattis and Dunford testified to lawmakers that defense spending needed to increase 3 to 5 percent, year over year, to restore the U.S. military’s competitive advantage.

Speaking at Halifax on Saturday, Dunford parried a question about whether the White House-ordered cut would mean strategic insolvency, saying, “It’s not that simple.”

“Various levels of resources can be accommodated if there is a path of predictability that allows us to make sound investments over five or seven years,” Dunford said.