Call this a shotgun marriage.

Goldman Sachs and Bass Pro Shops are close to buying retail hunting giant Cabela’s, The Post has learned.

“Bass is the only buyer around it,” a source said.

Private equity suitors including Apax Partners and TPG Capital have dropped out of the process.

The auction to buy Cabela’s is expected to wrap up within days, sources close to the process said.

Cabela’s shares fell 1.5 percent Wednesday, to $52.65, after hedge fund ValueAct reported that it sold its Cabela’s position. The 82-store chain has a $3.6 billion market cap.

Meanwhile, Cabela’s has found a separate buyer for its credit card business, which is responsible for about 30 percent of total sales. The chain expects to sign the deal at the same time it signs an agreement with Bass Pro and Goldman to sell the retail operation.

Cabela’s and Bass Pro are about the same size and together will become the dominant seller of outdoor and hunting gear. Presently, Cabela’s generates about 40 percent of its sales from hunting equipment.

Since October, Cabela’s has been under fire from activist investor Paul Singer’s Elliott Management hedge fund, which bought an 11 percent stake and pressed management to consider options for boosting the stock price, including a sale.

Cabela’s leadership has resisted a sale to Bass Pro in years past but now is more open to the idea.

Brothers Richard and Jim Cabela founded the company in 1961. Richard died in 2014, and Jim, who is Cabela’s chairman, is not often in the office, sources said.

Cabela’s didn’t return a call for comment. Bass Pro declined to comment.