Blockbuster Inc. is set to file for bankruptcy on Thursday in New York before the stock market opens, using a $125 million loan to reorganize so it can compete with rivals such as Netflix Inc. in renting movies online, according to a person with knowledge of the planned petition.Billionaire investor Carl Icahn, who bought about one-third of Blockbuster’s bonds, will join with a group of creditors in swapping their debt for all of the video-rental company’s stock, according to the person and two others who declined to be identified because the discussions are private.Blockbuster, saddled with more than $900 million in debt, has stopped paying interest to its lenders. The company, led by Chief Executive Officer James Keyes, has said it may have to file for bankruptcy as it tries to restructure its operations and finances.Blockbuster shares lost 2.5 cents, or 31 percent, to 5.5 cents at 3:05 p.m. New York time in over-the-counter trading. The shares have lost about 92 percent of their value this year. If creditors get all of Blockbuster’s stock, current shareholders will be wiped out.In attempting to revive its business, Blockbuster will keep stores that are doing well, while using its bankruptcy loan to take on Netflix and companies that rent videos in kiosks, said the person with knowledge of the plan. The Dallas-based company was founded in 1985, and grew to serve almost 47 million customers daily in the US and 16 other countries. Viacom Inc., which owns the Paramount film studio, bought Blockbuster from Wayne Huizenga for $8.4 billion in 1994, then spun it off to shareholders in 2004.The 74-year-old Icahn led a proxy fight in 2005 that put him on the video rental chain’s board. He resigned as director in January and in March sold most of his 16.9 percent common- share stake, according to a regulatory filing.