diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog
index 1690c4848911aeb050baeafa9357d50f6c6f080a..cfd757c6b76bd587ff53386f28c88c221069b0b2 100644
--- a/smartmontools/ChangeLog
+++ b/smartmontools/ChangeLog
@@ -1,5 +1,10 @@
 $Id$
 
+2022-05-22  Eaton Zveare  <eaton@eaton-works.com>
+
+	ataprint.cpp: Add master_password_id to ata_security json output
+	(GH pull/134).
+
 2022-05-08  Gabriele Pohl  <contact@dipohl.de>
 
 	drivedb.h:
diff --git a/smartmontools/ataprint.cpp b/smartmontools/ataprint.cpp
index 3a64c8b3052fb1e8bd2676fe99aefab5807f16a8..fc984e84d2961fd0df56abc1a7f4ce2a1b49e8d5 100644
--- a/smartmontools/ataprint.cpp
+++ b/smartmontools/ataprint.cpp
@@ -3237,7 +3237,7 @@ static void print_apm_level(const char * msg, int level)
   }
 }
 
-static void print_ata_security_status(const char * msg, unsigned short state)
+static void print_ata_security_status(const char * msg, unsigned short state, unsigned short master_password_id)
 {
   // Table 6 of T13/2015-D (ACS-2) Revision 7, June 22, 2011
   if (!(state & 0x0001)) {
@@ -3291,6 +3291,7 @@ static void print_ata_security_status(const char * msg, unsigned short state)
     if (locked)
       jref["pw_attempts_exceeded"] = !!(state & 0x0010);
   }
+  jref["master_password_id"] = master_password_id;
 }
 
 static void print_standby_timer(const char * msg, int timer, const ata_identify_device & drive)
@@ -3653,7 +3654,7 @@ int ataPrintMain (ata_device * device, const ata_print_options & options)
 
   // Print ATA Security status
   if (options.get_security)
-    print_ata_security_status("ATA Security is:  ", word128);
+    print_ata_security_status("ATA Security is:  ", word128, drive.words088_255[92-88]);
 
   // Print write cache reordering status
   if (options.sct_wcache_reorder_get) {