HTC is laying off 1,500 people after years of losing money and market share.

The struggling Taiwanese smartphone manufacturer confirmed Monday that it is downsizing as part of a broader "realignment of resources across the organization." It expects to complete the layoffs by September.

"HTC continues to review its operations to ensure production resources align with key strategic initiatives, so that the company can more effectively compete in its target markets while maintaining its innovative edge," an HTC spokesperson said in a statement provided to CNNMoney.

Despite critical acclaim for phones like the HTC One, the company has seen its share of the market decline steadily amid stiff competition from Apple and Samsung.

HTC held just 0.3% of the smartphone market in the first quarter of this year, down from as much as 10% in 2011, according to data Gartner provided to CNNMoney. "They are not a significant contender within the smartphone space," said Tuong Nguyen, a Gartner analyst.

Related: A Chinese smartphone brand is winning over high-spending Indians

Meanwhile, the company's bet on virtual reality has yet to pay off handsomely enough to revive the company's fortunes. Nguyen says the VR market is "just a slower burn than I think people expected based on the hype."

Earlier this year, Google completed a $1.1 billion dollar deal to scoop up about 2,000 HTC engineers and technical staff. All of this leaves HTC in the position of having to shrink its way to success.