The stock market is rigged.

When I started making that claim years ago — and provided solid evidence — people scoffed. Some called it a conspiracy theory, tinfoil hats and that sort of stuff. Most people just ignored me.

But that’s not happening anymore. The dirty secret is out.

With stock prices rushing far ahead of economic reality over the last six or so years, more experts in the financial markets are coming to the same conclusion — even if they don’t fully understand how it’s being rigged or the consequences.

Ed Yardeni, a longtime Wall Street guru who isn’t one of the clowns of the bunch, said flat out last week that the market was being propped up. “These markets are all rigged, and I don’t say that critically. I just say that factually,” he asserted on CNBC.

Yardeni’s claim is the most basic one: that the Federal Reserve won’t do anything that will upset Wall Street and, in fact, is doing all it can to help the stock market.

But there are other recent claims that come closer to the bull’s-eye, even if the archers don’t quite see what they are hitting.

The Wall Street Journal carried an intriguing story on March 11 about how the Bank of Japan was “aggressively purchasing stock funds.” (The Journal is owned by News Corp., the parent of The Post.)

“By directly underpinning the market, [Bank of Japan] officials have tried to encourage private investors to follow suit and put more money in stocks in the hope of stimulating the economy and increasing inflation,” read the report with a Tokyo dateline.

That’s called rigging the market for a higher purpose, or hoping people who can afford to invest in stocks will make lots of money and spend it. The benefits, Japan’s central bank believes, will then trickle down to the rest of the economy.

The Journal provided lots of details that I won’t get into here. But the paper also presumed that all these central bank stock purchases were being done on the Tokyo market and that only the shares of Japanese companies were being rigged.

That’s not necessarily the case. The Bank of Japan — and other central bankers around the world — could easily be purchasing shares of American companies to help out the US stock market.

And Japan could even be doing it with the blessing of Washington, which is afraid any direct intervention in equities on its part would be discovered by nosy people like me.

Last fall, we learned that one American exchange has made intervention in — rigging — foreign governments easier and cheaper to accomplish. In October, it emerged that CME Group, the Chicago exchange that trades options and commodities, had an incentive program under which foreign central banks could buy stock market derivatives like the Standard & Poor’s futures contracts at a discount.

As I’ve reported many times, S&P futures contracts are the vehicle of choice for rigging the market. They are a cheap and very powerful way to cause an artificial buying frenzy.

After the market’s sizeable drop on Wednesday — the Dow alone lost 292.60 points — be on the lookout today for aggressive S&P futures buying today. It could start in Asia or Europe, but it almost always occurs.

Foreign central banks, of course, really don’t need a discount to buy S&P futures contracts. That’s like billionaires clipping cents-off coupons. But what the CME’s discount tells us is that the Bank of Japan and other central banks are probably already customers.

So the rigging of US stock markets by foreign entities has likely been going on for some time.

Has the US ever directly rigged the stock market? I’m sure it has. The sloppiest attempt seems to have occurred in 2008 during the financial crisis, when Washington was sure our whole financial system was toppling.

Phone logs that I received showed numerous calls between Treasury secretary Hank Paulson and Wall Street banks — Goldman Sachs, in particular — that seemed to coincide nicely with stock market rallies.

Unlike the Bank of Japan, Washington would have been coy about rigging the stock market and probably would have used proxies. The New York Federal Reserve Bank, for instance, would wink and nod at its favorite banks, and trades that turn the stock market upward would suddenly be made.

There’s another kind of market rigging that is also going on. This is being done by companies themselves.

Since corporate profits and revenues aren’t growing enough to justify current high stock prices, companies have been aggressively buying back massive quantities of their own shares.

By doing this, companies reduce the number of their shares owned by the public. This accounting trick boosts the calculation of profit-per-shares because the numerator of the equation (earnings) remains the same while the denominator (outstanding shares) is reduced.

Okay, so the markets are rigged. Basically everyone now agrees on that. But should we care?

America was built on capitalism and free and fair markets. Today’s markets aren’t fair. In fact, they are unfair because they are putting lots of money into the pockets of a small number of Americans.

The bigger problem is this: If stock prices are artificially inflated, nobody can tell what a company is really worth. And banks are going to be hesitant to lend money to companies with fuzzy valuations.