Frank Yiannas has spent years looking in vain for a better way to track lettuce, steaks and snack cakes from farm and factory to the shelves of Walmart, where he is the vice president for food safety. When the company dealt with salmonella outbreaks, it often took weeks to trace where the bad ingredients came from.

Then, last year, IBM executives flew to Walmart’s headquarters in Arkansas to propose a solution: the blockchain.

As Mr. Yiannas studied their pitch, he said, “I became increasingly convinced that maybe we were onto the holy grail.”

The blockchain — the buzzy, bewildering technology behind cryptocurrencies like Bitcoin — is starting to be applied to real-world problems like tracking pork chops, shipping containers and footwear with a speed and security not currently possible. The IBM-Walmart partnership is one of the biggest practical tests to date.

At its heart, blockchain simply refers to a bookkeeping method that “chains” together entries so that they are very difficult to modify later. It provides a way for large groups of unrelated companies to jointly keep a secure and reliable record of their transactions.

IBM is trying to position itself at the forefront of the heated competition for practical uses of this arcane idea. Walmart is just one of 400 IBM clients testing it out, and IBM now has around 650 employees dedicated to the technology.

The most immediate business opportunities are in the financial world as a tool to track and trade stocks, bonds and other assets. But in the next week, Maersk, the global shipping giant, is expected to announce it is using IBM’s version of the blockchain to track the avocados, flowers and machine parts it carries on its enormous cargo ships. Last month, the government of Dubai said it was working with IBM to trace the goods flowing through its ports.

Yet success is far from assured.

Rival Microsoft said this past week that it was working with JPMorgan Chase and several other corporate giants on a system that competes against IBM’s, based on the virtual currency network known as Ethereum. Many banks are concerned that IBM could push them into a version of the blockchain that would lock them into IBM’s software.

“We believe with 100 percent certainty that it’s going to matter,” Mark Russinovich, the head of Microsoft’s blockchain efforts, said of the technology. “It’s a question of where’s its going to matter and how it’s going to matter.”

Trust in Transactions

It was Bitcoin that first caught the attention of IBM researchers, and everyone else.

Bitcoin, born in 2009, represented a novel idea in the financial world. Unlike, say, dollars or yen, Bitcoins are virtual tokens, unaffiliated with any nation. Anyone can open a wallet and receive Bitcoins — without providing any identifying information — and transactions are recorded on a universal ledger that is visible to everyone.

Drug dealers have embraced its relative anonymity. And people who live in countries that strictly control their financial systems, like China and Venezuela, have used Bitcoin to store their money beyond the watchful eye of the government.

But while the public focused on stories like these, geeks became fascinated with Bitcoin’s underlying structure and the communal way in which it was updated. That database was referred to as the blockchain because all the transactions were sorted into “blocks,” and each block was chained, using sophisticated math, to the ones before it, all the way back to the very first transaction — a structure that makes it tough for anyone to change the records after the fact.

In 2014, a handful of IBM employees began building their own version of Bitcoin, known as Blue Coin, which could be used to track financial transactions, totally independent of Bitcoin. But it was a small, exploratory project with no real support inside IBM.

“I was prepared to tell them to shut it down, that cybercurrency is not our role to play,” said Arvind Krishna, director of research at IBM.

But a team kept working on the technology, changing the name to Bluechain and then to Openchain. And Mr. Krishna eventually invited his team to a meeting at IBM’s central lab in Yorktown Heights, N.Y., for one last chance to defend the technology.

They explained that this was about more than just a currency — it was a new way of tracking shipments and transactions in supply chains of all kinds, from food to prescription drugs to diamonds. Because all the participants would be keeping their own live version of all the data, without a central authority, they could immediately see everything that was going on and trust that no one else had tampered with it.

“That was the ‘aha’ for me,” Mr. Krishna said. “This was not really about digital payments, but establishing trust in transactions in general.” He called it “a technology that can change the world.”

There are still many in the industry who are skeptical of the long-term significance of the blockchain concept. Doubters have said that it is, at best, a slightly more reliable way to track data, and at worst, a much less efficient method of keeping data than current ones that rely on central gatekeepers.

But blockchain champions like to compare it to the significance of the internet, which provided a universal computing language for communicating seamlessly among networks. The blockchain, they say, could provide that universal language for valuable data and information.

A few months after Mr. Krishna’s aha moment, his team presented the idea at an annual gathering where IBM’s top executives consider new technologies that could be major opportunities — or threats — to IBM’s business. Blockchain was the first subject of discussion, and the first that Virginia Rometty, IBM’s chief executive, gave the green light to.

She turned to Mr. Krishna, the research chief, and said, “You run with this,” he recalled. She asked for a working version within two months.

Her hurry-up response was a reflection, in part, of IBM’s eagerness to find new businesses to make up for the erosion of its traditional hardware, software and services offerings. The company has made progress with new products like data-analysis software and its Watson artificial intelligence software.

But growth in new businesses has not yet offset declines in traditional businesses. In January, IBM reported its 19th consecutive quarterly drop in revenue, though some of that sales retreat was because of profit-draining operations the company sold off, like semiconductor manufacturing and industry-standard server computers.

IBM has already suffered from being late to one of the biggest trends in technology today, cloud computing, where it moved slowly at first and watched the early market leadership go to Amazon and Microsoft. Today, Mr. Krishna said, “The first-mover advantage is even more important than it used to be.”

After getting Ms. Rometty’s push on the blockchain, the IBM team’s first move was to make its software “open source,” meaning that it would be free and available for anyone to review and tinker with. IBM’s bet was that this would establish its technology as a de facto standard, and that it could make money by selling software and services that would sit on top of the technology.

It was the chairman of IBM Europe, Erich Clementi, who personally pitched the concept to the top technology executive at Maersk. Like Walmart, Maersk had already been looking for years for a better way to trace the goods it ships around the globe.

For Maersk, the problem was not tracking the familiar rectangular shipping containers that sail the world aboard its cargo ships — instead, it was the mountains of paperwork that go with each container. Maersk had found that a single container could require stamps and approvals from as many as 30 people, including customs, tax officials and health authorities.

While the containers themselves can be loaded on a ship in a matter of minutes, a container can be held up in port for days because a piece of paper goes missing, while the goods inside spoil. The cost of moving and keeping track of all this paperwork often equals the cost of physically moving the container around the world.

What’s more, the system is rife with fraud. The valuable bill of lading is often tampered with or copied to let criminals siphon off goods or circulate counterfeit products, leading to billions of dollars in maritime fraud each year.

Maersk and IBM began working on a version of its software that would be open to everyone involved with every container. When customs authorities signed off on a document, they could immediately upload a copy of it, with a digital signature, so that everyone else involved — including Maersk and government authorities — could see that it was complete. If there were disputes later, everyone could go back to the record and be confident that no one had altered it in the meantime. The cryptography involved would make it hard for the virtual signatures to be forged.

The first test of the system happened last summer and tracked all of the paperwork related to a container of flowers moving from the Port of Mombasa in Kenya to Rotterdam in the Netherlands. It went well enough that Maersk and IBM followed up by tracking containers with pineapples from Colombia, and mandarin oranges from California.

The difficulty of making this work in the real world is that everyone at every step along the way needs to be involved, otherwise it’s unlikely to induce any more confidence than the old system.

“You need to have something in it for all stakeholders, in order to get the whole chain going,” said Jakob Stausholm, the chief financial and technology officer at Maersk, who is leading the project. “That’s the difficult part.”

IBM and Maersk have recently been seeking cooperation from customs authorities, freight forwarders and the producers that fill the containers. Just last month, Maersk and IBM began running their first trials with these partners involved, on shipping routes between Rotterdam and Newark.

A Question of Control

Not everyone has been so willing to buy in to the IBM approach.

Many technologists who got excited about Bitcoin have said that the newer, corporate-designed blockchains — like the one being built by IBM — are missing one of the main elements of Bitcoin’s success, namely the extremely decentralized structure. Anyone in the world can join Bitcoin and, in effect, study its ledgers. But only a limited set of participants can gain access to ones like IBM’s.

That could make them more vulnerable to attack from, say, a hacker who targets a few of the participants. Even though the IBM technology for tracking shipments is more decentralized than previous methods, “it still concentrates power in a handful of entities,” said Emin Gun Sirer, a professor at Cornell who studies distributed systems.

The companies working with IBM have been less worried about these security issues. Almost all of them demanded that the system not be open like Bitcoin. While they are giving up some security benefits, the private blockchains can move faster than Bitcoin, which has been plagued by delays.

IBM has faced questions from companies worried that the tech giant has too much control over the system it is building and could make them dependent on IBM software for years to come.

IBM tried to fend off this line of attack when it made its software open source in 2015. The foundation that is now in charge of the computer code, the Hyperledger Foundation, has attracted many other companies that are now working on the project alongside IBM. Just in the past week, the Bank of England, Kaiser Permanente and nine other new members joined.

But the director of the Hyperledger Foundation, Brian Behlendorf, acknowledged that IBM is still the single largest contributor to the project. As a result, it has been an uphill battle to convince others that it is not simply an IBM project.

“They have such a head start that it can leave the impression that Hyperledger is an IBM product,” Mr. Behlendorf said. “We are trying to tell a story about the other companies building on top of Hyperledger. That is emerging. It will take some time.”

Microsoft has fended off this sort of problem by focusing most of its efforts on a blockchain that it had nothing to do with building, the blockchain behind the virtual currency known as Ethereum. This has already helped Microsoft move in on some clients that IBM is also pursuing. Bank of America, for instance, is building a system with Microsoft that will track the flows of money around trade deals.

But IBM has taken an early lead. Its list of collaborators includes the likes of the London Stock Exchange and the Bank of Tokyo, and lots of companies outside the financial world like Maersk and Walmart. “This is the most well-thought-out project in the space,” said Mr. Sirer, the Cornell professor.

Now all IBM has to do is get the systems out into the real world and show that they work.

At Maersk, Mr. Stausholm said it could take five or even 10 years for that to happen, given all the partners — manufacturers, customs officials and farmers — that need to come together. “I really do believe in it,” he said, “but I don’t know how fast it will be able to take off.”

At Walmart, Mr. Yiannas is more optimistic. His company has already completed two pilots with IBM — moving pork from Chinese farms to Chinese stores, and produce from Latin America to the United States — and he is confident a finished version can be put together within a few years. “I think this is our one best hope for getting it right,” he said.