TORONTO—BlackBerry Ltd. Tuesday agreed to acquire Germany's Secusmart GmbH for an undisclosed amount to further bolster its mobile security offerings for companies and governments.

BlackBerry is counting on a return to its roots in developing secure smartphone technology for the enterprise market to reignite profits after its bid to compete in the consumer market against Apple Inc., Samsung Electronics Co. and other device makers fell flat. Closely held Secusmart of Düsseldorf makes encryption technology to guard against eavesdropping...