SAN FRANCISCO — Hewlett Packard Enterprise said Friday that it would buy the supercomputer pioneer Cray, a relatively tiny financial transaction that could loom large in a quickening race between the United States and China at the highest reaches of computing.

The big Silicon Valley company will pay about $1.4 billion to absorb a much smaller rival that has designed some of the most powerful systems in use and on the drawing board at national laboratories in the United States.

Supercomputers have long been a mainstay of military and intelligence agencies, used for chores ranging from cracking codes to designing nuclear weapons. They have many civilian uses as well, like predicting weather, creating new drugs and simulating the effect of crashes on auto designs.

Cray, based in Seattle, traces its lineage to a company founded in 1972 in Minnesota by the computer designer Seymour Cray. That company was bought in 1996 by Silicon Graphics; it was sold in 2000 to Tera Computer, which adopted the Cray name. Mr. Cray died after a car crash in 1996, having left his original company several years earlier.