Research in Motion, the company behind the BlackBerry smart phone, has made some spectacularly wrongheaded moves in the six years since Apple announced its first iPhone. It said the iPhone wasn’t a game changer and claimed that apps don’t matter. It’s grafted new features like touch input onto its aging operating system in ways that didn’t please anyone. It’s wasted time it didn’t really have to spare on a misbegotten tablet.

But in April 2010, RIM did something deeply sensible: it acquired QNX, the maker of a highly regarded, industrial-strength operating system used for applications such as car electronics and medical devices. It then set out to build all-new BlackBerry phones built on top of QNX’s plumbing — a project so ambitious that it wasn’t the least bit startling that it took years and involved multiple delays.

And now, at long last, that 2010 decision has a shot at paying off.

Last week, RIM began its press event in New York City by announcing news that was simultaneously shocking and logical: it was changing its name to BlackBerry, bringing its corporate branding in line with its much more famous product. Then it unveiled the first two phones running BlackBerry 10, its new QNX-based platform. The BlackBerry Z10 is a full-touch model that goes on sale in some countries this month; it’ll show up in the U.S. on AT&T, T-Mobile and Verizon in March. (Only Verizon has announced a price so far: $199 with a two-year contract.) The BlackBerry Q10, which sports the iconic BlackBerry physical QWERTY keyboard, will arrive later this year.

I’ve spent the past few days with a Z10 review unit provided by BlackBerry. The phone isn’t the sort of reality-defying, epoch-shifting landmark BlackBerry would have needed to silence its critics and lure teeming masses of skeptical iPhone and Android fans. It needs more high-profile apps, additional features to set it apart from other smart phones and fewer gnarly bugs.

But you know what? In multiple ways, it’s already better than I expected it to be. Behind the scenes, BlackBerry has been building a mobile operating system that’s fresh, fun and functional. It’s put the software on a handset that’s recognizable both as a current smart phone and as a BlackBerry — just the sort of thing it desperately needed to keep remaining BlackBerry loyalists from defecting.

The Z10 feels modern in part because it’s the first BlackBerry in years that isn’t based on outdated hardware. Its 4.2-in. screen is midsize by 2013 standards; the 1280-by-768 resolution gives it an eyeball-pleasing density of 356 pixels per inch, a skosh better than the iPhone 5. It’s got an 8-megapixel camera on the back and a 2-megapixel one on the front for video calls, a zippy dual-core processor, LTE 4G wireless broadband and 16GB of storage with a MicroSD slot for expansion.

The industrial design, while not exceptional, is nice. The phone is .35-in. thick, but the bedimpled plastic back pops off so you can replace the battery. (Which you may well want to do: after a day of use, I found that the battery gauge was usually dangerously close to empty.)

Modern phones, of course, aren’t defined by their hardware. All that plastic, metal and silicon is just a container for software and services. And while BlackBerry 10 isn’t really the 10th version of the BlackBerry operating system — it won’t run programs written for any previous version — it works hard to update some of the concepts that once made BlackBerrys so successful.

Back in the 1990s, the very first RIM devices weren’t smart phones — they were smart pagers, and their defining application was the first really powerful e-mail service you could put in your pocket. E-mail and other methods of textual communications have remained core to the BlackBerry experience ever since, an emphasis that doesn’t change in BlackBerry 10.

You do much of your communicating in the BlackBerry Hub, an überapp that stitches together e-mail, phone calls, updates from social services such as Facebook and Twitter, text messaging and BlackBerry Messenger, which now does video calls and screen sharing as well as instant messaging. The BlackBerry folks envision the Hub as a timesaver that will reduce the need to bounce around from separate app to separate app; in fact, they don’t even provide a dedicated home button to get you to BlackBerry 10’s home-screen grid of app icons. (You reach it by swiping up and to the right, a gesture that’s easy enough once you remember it.)

The BlackBerry Hub is well done, but the Z10 wouldn’t be nearly so slick a communicator if it weren’t for its on-screen keyboard. It’s the best stock keyboard I’ve ever seen on a touch-screen smart phone — a smart successor to the clicky little physical keys on most BlackBerrys of yore.

As with an iPhone or Android handset, you can tap to type, a process that benefits from such niceties as number keys that sit in a row atop the alphanumeric ones and gestures like the ability to swipe the backspace key to delete an entire word. But the BlackBerry 10 keyboard uses predictive technology to let you type without tapping. As you type, the operating system displays its best guess for the word you’re planning to enter on the spacebar, letting you complete it with one touch. It also wedges other word possibilities in between the letters on the on-screen keyboard. You can select any of them by flicking a word upward — whereupon the software may show its guesses about the next word you intend to type.

I found that mastering all this wasn’t a cakewalk: the word suggestions are displayed in tiny, low-contrast type that’s tough to read, and I’m used to typing as fast as my thumbs can muster, which tends to cover the suggestions. But with a little squinting and adjustment to my habits, the keyboard let me get text into e-mail and other applications at a remarkably speedy clip.

A feature called BlackBerry Balance, also available on the PlayBook tablet, caters to a traditional BlackBerry fan base: corporate IT people. Using BlackBerry’s server software, they can divvy the operating system into two separate-but-equal environments — one for personal stuff and one for work stuff. Each can have its own set of e-mail accounts, apps and other items, and a company can enforce security measures such as preventing an employee from cutting and pasting corporate data into a personal e-mail account.

Beyond all these classically BlackBerryesque touches, the company has packed BlackBerry 10 with other apps. It’s built camera software with a mind-bending feature — somewhat similar to one in some Samsung phones — that lets you snap a group portrait, then move individual faces backward and forward through two seconds’ worth of time until everyone is smiling and has open eyes. There’s a little tool for composing multimedia shows, a note-taker called Remember and a voice-powered assistant akin to Apple’s Siri and Google’s Google Now. The company has also put together decent on-phone storefronts for music, movies, TV shows and magazines.

It’s easy to find spots where these offerings are shallower than their iPhone and Android counterparts — the map app and voice assistant are both minimalist compared with the competition. But there are also plenty of instances of the bundled apps going beyond the basics; the Web browser, for instance, has a streamlined reader review that’s comparable to the one in Apple’s Safari.

And then there are third-party apps and games — an impressive-sounding 70,000 of them at launch, the company says. Plenty of high-profile contenders are already in the BlackBerry World store or on their way: Documents to Go, Dropbox, Facebook, Foursquare, Fruit Ninja, Jetpack Joyride, Kindle, LinkedIn, Rdio, Skype, Twitter, Where’s My Water and others.

Appwise, it’s probably the most impressive haul ever for an operating-system debutante. And yet, there’s no way for a brand-new platform to come anywhere close to rivaling Apple’s iOS or Google’s Android, both of which boast hundreds of thousands of programs. Among the high-profile apps and games that aren’t (yet) on BlackBerry 10: Bejeweled, Flipboard, Hipstagram, Hulu Plus, Instagram, Netflix, Temple Run and YouTube. Evernote is also missing, although BlackBerry’s own Remember app is similar and provides access to Evernote notebooks.

The more I dug around in BlackBerry World, the less giddy I was over the count of 70,000 apps. Some of the lesser known wares I sampled were crude conversions of PlayBook or Android apps that weren’t so hot in the first place. Quantity is fine, but what BlackBerry World needs most of all is quality.

Other than the app situation, the biggest telltale signs that BlackBerry is rushing to play catch-up with iPhone and Android are the bugs and other raw edges that remain. It’s no shocker that they’re there — even Apple’s iOS, the most polished mobile operating system, still gets a tad erratic when it undergoes a major upgrade — but they’re irritating evidence that BlackBerry could have used even more time to wrap up BlackBerry 10.

Some of the glitches I ran into:

At one point, almost all the features in the browser — like the ability to share pages — refused to recognize my gestures. (They started paying attention again once I rebooted the phone.)

The operating system periodically froze altogether for a few seconds, and back buttons didn’t always function.

Remember, the Evernote-like note-taker, is a mess — it referred to calendar items by cryptic monikers like “appointment_19343” and kept redownloading the same photos from Dropbox every time I opened the app.

When I tried to use PayPal to pay for apps and movies, the phone not only wouldn’t accept it but also spit up cryptic error messages that didn’t seem to be designed for consumption by human beings at all.

Major operating systems may get all the attention, but minor ones can matter at least as much. If a thoroughly debugged BlackBerry 10.1 comes along soon, it would make the Z10 much easier to recommend.

Even then, the new, improved BlackBerry could turn out to be a noble failure. It’s not clear that the mobile market has room for a another solidly successful operating system beyond iOS and Android: Palm’s Palm Pre was bursting with promise but never went anywhere, and Microsoft’s Windows Phone is admirable but not yet popular.

So if you still think BlackBerry is toast, that’s your prerogative, and you could be right. We’ll see.

Still, the company that’s releasing the Z10 can no longer be dismissed as an embarrassingly out-of-touch outfit hobbled by an obsolete operating system. It’s not going to trounce the iPhone and Android, but it has a shot at re-establishing itself as a scrappy underdog with a viable platform. Even that would count as a surprise comeback for a company that so many have written off for so long.