Samsung is the behemoth of the smartphone world, dominating the Android eco-system but in 2013 its Galaxy S4 was not as well received as the company hoped for, while at the same time selling tens of millions of units.
Sony on the other hand made slow but steady progress in 2013, first with the Xperia Z and then with the Xperia Z1 in September. Six months later, it's back again with the bigger but slimmer Xperia Z2, featuring 4K video shooting.
But with both phones set to hit the market at the same time, and costing relatively the same amount the money, which should you choose as your next smartphone?
Galaxy S5 vs Xperia Z2: Screen
All the talk ahead of the launch was that the Galaxy S5 would have a super sharp 2K resolution (2,560 x 1,440 pixels) but it turns out that Samsung has simply made the phone 0.1in bigger and retained the Full HD resolution (1920 x 1080).
Sony has done the exact same thing with the Xperia Z2, boosting the screen size to 5.2in and keeping the resolution identical at 1920 x 1080 pixels. Sony will be hoping that its Reality Display and Triluminous technology borrowed from its television will help it stand out from the competition.
Galaxy S5 vs Xperia Z2: Design
Again, all the talk ahead of the launch of the Galaxy S5 was of Samsung taking a leaf out of Apple, Sony and HTC's book by producing a phone with premium materials rather than the plastic chassis we're used to from the flagship Galaxy S models.
That hasn't happened and the S5 looks like a slight bigger S4 retaining the plastic construction, though with a new dimpled rear cover.
The Xperia Z2 follows Sony's OmniBalance design language with a mixture of glass and aluminium construction but has slimmed down compared to the Z1, with bulk being one of the bigger gripes people had with last year's model.
Both phones are IP-67 rated making them water and dust proof but this does mean you get fiddly flaps covering the microUSB ports.
Galaxy S5 vs Xperia Z2: Hardware
The Galaxy S5 has added a couple of more unique features to help it stand out from the crowd. Its fingerprint sensor adds security and makes it much easier to pay online (if you use PayPal that is).
While the addition of the heart rate monitor will please some, I can't imagine too many people using it while out running or during a workout in the gym to keep an eye on their heart-rate. Samsung's inclusion of one of its new Gear 2 smartwatches makes much more sense.
Samsung and Sony have both updated the chips powering their flagship smartphones, but while this will ensure everything continues to run smoothly, performance issues were not a problem with either of these phone's predecessors.
Sony's unique hardware feature is noise-cancelling earphones. Where regular noise-cancelling headphones need their own batteries and processing hardware to block out the ambient noise of planes and trains, Sony's earphones borrow processing power from the phone itself.
A microphone on the earbuds feeds ambient noise to the phone, which then cancels it out. Sadly the system only works with the earbuds supplied with the phone.
Galaxy S5 vs Xperia Z2: Operating System
Both of these phones will come with Android 4.4 (KitKat), the latest eversion of Google's operating system. But that's just half the story, with both adding their own customisations on top.
Samsung has added an updated version of TouchWiz to the Galaxy S5, giving its interface a polish and making it look more like iOS 7. It also replaces Google Now with Samsung's own My Magazine app with a swipe to the left from the homescreen.
Sony has once again bundled its own apps for films, music and PlayStation Games with the Xperia Z2, but the Sony additions to the software are much less intrusive that Samsung's TouchWiz.
Galaxy S5 vs Xperia Z2: Camera
This is possibly the area where Samsung has made the biggest improvements. The Galaxy S5 has a new 16 megapixel sensor (compared to the 13 megapixel sensor on the Galaxy S4) which promises 4K video recording.
Samsung has also included a slow-mo mode; Selective Focus to allow you refocus a picture after taking it and Live HDR to see what a picture would look like with HDR mode on.
Sony continues to use a specially designed 20.7 meapixel camera (also seen on its Z1 Compact model) but this time it's capable of recording 4K video (if that's of interest to you); 120 frames-per-second slow motion mode; Steadyshot to avoid blurry videos and Timeshift burst to take 61 photos in just two seconds.
Basically it boils down to the fact that no matter which phone you buy, you're going to get a very good camera.
Galaxy S5 vs Xperia Z2: Which Should I Buy?
It's almost impossible to say without testing out the new smartphones properly.
What we can say is that both offer 4K video capture, both have 5in+ screens of identical resolution, both run Android 4.4, both have powerful processors and both will cost around the same amount SIM-free or on contract.
What makes the Galaxy S5 stand out is its heart-rate monitor and fingerprint sensor, while the Xperia Z2's premium finish will be of more importance to some.
It's a close call, and will ultimately be down to personal choice.