New York CNN —. Walgreens is closing approximately 1,200 locations as the drug store chain struggles to contend with online competitors and declining prescription drug payments.. By 2027, about one in seven Walgreens currently open will close its doors. About 500 Walgreens will close its doors over the next year, the drug store chain announced Tuesday.. Those closures represent a significant escalation from a few months ago, when the financially struggling company announced in June it was shutting 300 underperforming locations as part of a multi-year optimization program under CEO Tim Wentworth. At the time, the company had said about a quarter of Walgreens stores were unprofitable, and the chain promised “imminent” changes.. Still, the company managed to post stronger-than-expected sales in the past quarter. Revenue at the chain rose 6% from the same quarter a year ago, but Walgreens reported a $3 billion loss largely because of a writedown of a Chinese pharmaceutical chain and a home care provider called CareCitrix.. The latest tranche of closures is “emblematic of a company that is in trouble and is trying to course correct,” according to Neil Saunders, retail analyst and managing director at GlobalData Retail.. “Walgreens spent years building its business through acquisitions and neglected the fundamentals of its stores and its retail operations,” he told CNN. “That has pushed a lot of outlets into a position where they are losing sales and are not generating a return.”. Shares of Walgreens (WBA) rose nearly 4% in premarket trading. However, its stock is down nearly 70% for the year.. The closures come amid a challenging time for drugstore chains, which are being hammered on a few fronts.. Major drugstore chains, including CVS and Rite Aid, have struggled in recent years because of declining profits from filling prescriptions. They’ve declined because of lower reimbursement rates for prescription drugs and new competition from Amazon.. Earlier this month, CVS announced it was cutting about 2,900 jobs as part of a $2 billion in cost savings initiative. The layoffs, which affect mostly corporate jobs, add to the 5,000 or so job reductions disclosed last year.. Related article Why Walgreens, CVS and Rite Aid are closing thousands of drug stores across America. The front-end of drugstores, where they sell snacks and household staples, also face pressure from larger competitors, including Target, and even Dollar General’s growth has also hurt drug store chains in rural areas.. In May, Walgreens slashed prices on more than 1,000 items, following rivals in an effort to lure back inflation-weary shoppers turned off by high prices.. CEO Wentworth said in a statement that the “turnaround will take time, but we are confident it will yield significant financial and consumer benefits over the long term.”. For Saunders, Walgreens’ eliminating the “dead wood will help the company strengthen its financials over time, but it is a huge admission of failure.”. CNN’s Nathaniel Meyersohn contributed to this report.