HTC has officially announced the much-rumoured One A9 smartphone. It comes with a lovely premium build and some good specs, even if they don't quite hit flagship territory.

We have put HTC's new device up against a few of the other mid-range Android smartphones that we think matches it on the spec-front.

Read on to find out how the HTC One A9 compares to the Google Nexus 5X, Motorola Moto X Play, OnePlus 2, Samsung Galaxy A5 and the Sony Xperia M5. What are the differences and how does the HTC One A9 stack up against its competition in the mid-range flagship field?

The HTC One A9 measures 145.8 x 70.8 x 7.3mm and weighs 143g. It features a premium metal build and offers a flat rear as opposed to a curved rear like the HTC One M7, One M8 and One M9.

It isn't the smallest, slimmest or lightest of the devices being compared here, with all three of those crowns go to the Samsung Galaxy A5 that measures 139.3 x 69.7 x 6.7mm and weighs 123g, also featuring a metal build, but it isn't the largest or heaviest either.

The OnePlus 2 measures 151.8 x 74.9 x 9.9m and hits the scales at 175g making it the largest and heaviest, while the thickest is the Motorola Moto Play X measuring 10.9mm at its thickest point. On the whole, the HTC One A9 sits in the smaller and lighter half of the devices with the Galaxy A5 and Sony Xperia M5.

As we mentioned, the HTC One A9 and the Samsung Galaxy A5 come with metal builds, while the Xperia M5, Moto X Play and Nexus 5X all opt for plastic. The Xperia M5 and the Moto X Play both have water repellant features though, while the Nexus 5X and OnePlus 2 have USB Type-C and fingerprint sensors. The One A9 also has a fingerprint sensor.

The HTC One A9 comes in four standard colour options, which is more than any of the other devices within this comparison, but the Moto X Play has the Moto Maker feature, which allows for the best customisation opportunities.

The HTC One A9 features a 5-inch AMOLED display with a resolution of 1920 x 1080 for a pixel density of 440ppi, which is the same size and resolution as the Sony Xperia M5.

The Samsung Galaxy A5 also has a 5-inch AMOLED display but the resolution drops to 1280 x 720 pixels, giving it a pixel density of 294ppi, which is the lowest of the bunch here.

The Nexus 5X ups the size to a 5.2-inch Full HD display for a 424ppi, while the OnePlus 2 and Moto X Play further increase the size to 5.5-inches but stick at Full HD for pixel densities of 401ppi. As a result, the HTC One A9 and Xperia M5 will have the sharpest and crispest displays but also the smallest.

Smartphones cameras are difficult to compare as it isn't just about the megapixels. There are various factors that contribute to helping a smartphone take a decent shot so it is worth reading our reviews before you pick one of these based on camera megapixels alone.

For number crunching sake however, the HTC One A9 comes with a 13-megapixel rear snapper with optical image stabilisation built in and a 4-megapixel UltraPixel front camera. The Nexus 5X, OnePlus 2 and the Samsung Galaxy A5 all sit around the same mark, sporting 5-megapixel front cameras and 12.3-megapixel or 13-megapixel rear snappers.

The Motorola Moto X takes things up a notch in the rear camera department with a bump to 21-megapixels but the rear remains at 5-megapixels, while the Sony Xperia M5 takes things up in both snappers, delivering the highest resolution sensors of the devices being compared. The Xperia M5 has a 21.5-megapixel rear camera and a 13-megapixel front camera.

The HTC One A9 comes with the Qualcomm Snapdragon 617 processor and either 2GB or 3GB of RAM, depending on the territory. There is a choice of 16GB or 32GB of internal memory and support for microSD storage expansion.

All the devices being compared here have different processors but they are all octa-core except for the Samsung Galaxy A5 which is quad-core. The OnePlus 2 has the fastest and latest chip on board, while the Galaxy A5 has the oldest.

When it comes to RAM support, the OnePlus 2 has a 4GB model available, the Sony Xperia M5 opts for 3GB, while the other three come with 2GB. In terms of storage, the Nexus 5X and Motorola Moto X Play offer the same as the HTC One A9 with 16GB and 32GB options, while the Galaxy A5 and Sony Xperia M5 both have 16GB only. The OnePlus 2 comes in 32GB and 64GB. Only the Moto X Play, Galaxy A5 and Xperia M5 offer microSD storage expansion like the HTC One A9.

The biggest battery capacity sits within the Moto X Play at 3630mAh, followed by the OnePlus 2 at 3300mAh. The smallest is within the HTC One A9 at 2150mAh, with the closest device in terms of battery being the Galaxy A5 at 2300mAh.

The HTC One A9 runs on Android Marshmallow with a refined version of Sense 7 over the top. You still get the HTC skin, but a few things have been removed, such as the HTC browser, which makes for a cleaner experience.

The Nexus 5X runs on pure Android 6.0 Marshmallow with no skin over the top so this device is Android in its rawest form, but the Motorola Moto X Play runs on Android Lollipop with hardly any extra apps and this will get an upgrade to Marshmallow soon.

The Samsung Galaxy A5 and Sony Xperia M5 both run on Lollipop with each company's respective skin over the top. OnePlus 2 has its own operating system based on Android Lollipop called Oxygen OS. This UI allows for more customisation.

The HTC One A9 has been priced in the UK at £429, which is the most expensive of the devices compared here. The Nexus 5X follows closely behind at £379.99, while the cheapest is the OnePlus 2 at £239.

The Motorola Moto X Play starts at £279 and the Samsung Galaxy A5 at £299. The Sony Xperia M5 is currently only available in the US for $439.

All of the six devices within this comparison have strengths and weaknesses and they are all good mid-range devices in their own right. They aren't flagships but they do have some flagship qualities.

The HTC One A9 is one of the smallest, lightest and it has one of the sharpest displays out there. It doesn't have the fastest processor or the largest battery capacity but it has a more premium build than others and it gives HTC users a cleaner software experience, as well as microSD support. It is the most expensive though.

The OnePlus 2 is probably the device with the closest to flagship specs if that is what you are after and it is £200 cheaper, but the HTC A9 certainly holds its own in the majority of areas and is a worthy consideration.