diff --git a/privatemsg.install b/privatemsg.install
index ed83c20..9856a5b 100644
--- a/privatemsg.install
+++ b/privatemsg.install
@@ -52,6 +52,13 @@ function privatemsg_schema() {
         'not null' => TRUE,
         'default' => 'user'
       ),
+      'is_replied'     => array(
+        'description'   => 'Whether the user has replied to this message',
+        'type'          => 'int',
+        'default'       => PRIVATEMSG_NOT_REPLIED,
+        'not null'      => TRUE,
+        'unsigned'      => TRUE,
+      ),
     ),
     'primary key'     => array('mid', 'recipient', 'type'),
     'indexes'         => array(
@@ -336,3 +343,18 @@ function privatemsg_update_7006() {
   variable_set("date_format_privatemsg_current_year", 'M j');
   variable_set("date_format_privatemsg_years", 'n/j/y');
 }
+
+/**
+ * Add replied field to track whether anyone has replied to a message.
+ */
+function privatemsg_update_7200() {
+  db_add_field('pm_index', 'is_replied',
+    array(
+      'description'   => 'Whether the user has replied to this message',
+      'type'          => 'int',
+      'default'       => PRIVATEMSG_NOT_REPLIED,
+      'not null'      => TRUE,
+      'unsigned'      => TRUE,
+    )
+  );
+}
diff --git a/privatemsg.module b/privatemsg.module
index d8286f6..05712ec 100644
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -17,6 +17,14 @@ define('PRIVATEMSG_UNREAD', 1);
  * Show unlimited messages in a thread.
  */
 define('PRIVATEMSG_UNLIMITED', 'unlimited');
+/**
+ * Status constant for unreplied messages.
+ */
+define('PRIVATEMSG_NOT_REPLIED', 0);
+/**
+ * Status constant for replied messages.
+ */
+define('PRIVATEMSG_REPLIED', 1);
 
 /**
  * Implements hook_permission().
@@ -1656,6 +1664,10 @@ function privatemsg_reply($thread_id, $body, $options = array()) {
     );
   }
 
+  // Add the reply_to_mid, so we can mark that message as replied
+  $thread = privatemsg_thread_load($thread_id);
+  $message->reply_to_mid = end($thread['messages'])->mid;
+
   $message->thread_id = $thread_id;
   // Load participants
   $message->recipients = _privatemsg_load_thread_participants($thread_id, $message->author);
@@ -1667,6 +1679,7 @@ function privatemsg_reply($thread_id, $body, $options = array()) {
       _privatemsg_handle_recipients($validated['message']->mid, $validated['message']->recipients, FALSE);
     }
   }
+
   return $validated;
 }
 
@@ -1844,6 +1857,15 @@ function _privatemsg_send($message) {
     }
     $query->execute();
 
+    // If this is a reply, mark the last message appropriately.
+    if (isset($message->reply_to_mid)) {
+      $query = db_update('pm_index')
+        ->fields(array('is_replied' => PRIVATEMSG_REPLIED))
+        ->condition('mid', $message->reply_to_mid)
+        ->condition('recipient', $message->author->uid);
+      $query->execute();
+    }
+
     module_invoke_all('privatemsg_message_insert', $message);
     field_attach_insert('privatemsg_message', $message);
 
@@ -3014,7 +3036,7 @@ class PrivatemsgMessageController extends DrupalDefaultEntityController {
     }
 
     $query = parent::buildQuery($ids, $conditions, $revision_id);
-    $query->fields('pmi', array('is_new', 'thread_id'));
+    $query->fields('pmi', array('is_new', 'thread_id', 'is_replied'));
     if ($this->account) {
       $query
         ->condition('pmi.recipient', $this->account->uid)
diff --git a/privatemsg.pages.inc b/privatemsg.pages.inc
index 243e5d9..a5521de 100644
--- a/privatemsg.pages.inc
+++ b/privatemsg.pages.inc
@@ -394,6 +394,13 @@ function privatemsg_form_reply($form, &$form_state, $thread) {
     '#weight' => 20,
   );
 
+  // Include the mid of the message we're responding to so we can mark it as 
+  // replied when the form is submitted.
+  $reply_to_mid = end($thread['messages'])->mid;
+  $form['reply_to_mid'] = array(
+    '#type' => 'value',
+    '#value' => $reply_to_mid,    
+  );
   $form['thread_id'] = array(
     '#type' => 'value',
     '#value' => $thread['thread_id'],
diff --git a/privatemsg.test b/privatemsg.test
index bb8827e..e29064d 100644
--- a/privatemsg.test
+++ b/privatemsg.test
@@ -1272,10 +1272,15 @@ class PrivatemsgAPITestCase extends DrupalWebTestCase {
     $this->drupalGet('messages');
     $this->clickLink($subject);
     $this->assertText(t('New'), t('Message is marked as new'));
+
+    // Send a message through the api and verify that it is not marked as replied
+    privatemsg_new_thread(array($recipient1), 'new thread', $this->randomString(20), array('author' => $author));
+    $message = $this->getMessageFromSubject('normal message');
+    $this->assertFalse($message->is_replied, t('Message is not marked as replied'));
   }
 
   function getMessageFromSubject($subject) {
-    return db_query("SELECT * FROM {pm_message} WHERE subject = :subject", array(':subject' => $subject))->fetchObject();
+    return db_query("SELECT * FROM {pm_message} m INNER JOIN {pm_index} i ON m.mid = i.mid WHERE m.subject = :subject", array(':subject' => $subject))->fetchObject();
   }
 
   function testPrivatemsgApiReply() {
@@ -1294,6 +1299,8 @@ class PrivatemsgAPITestCase extends DrupalWebTestCase {
 
     $resultok = privatemsg_reply($thread_row->mid, 'Test Body', array('author' => $author));
     $this->assertTrue($resultok['success'], 'Reply could be sent successfully');
+    $reply_message = privatemsg_message_load($thread_row->mid, $author);
+    $this->assertTrue($reply_message->is_replied, 'Reply was marked as replied.');
 
     $resultok = privatemsg_reply($thread_row->mid, 'Test Body', array('author' => $recipient1));
     $this->assertTrue($resultok['success'], 'Reply could be sent successfully');
@@ -1305,7 +1312,6 @@ class PrivatemsgAPITestCase extends DrupalWebTestCase {
     $resultf2 = privatemsg_reply($thread_row->mid, 'Test Body', array('author' => $recipient3));
     $errormessage = t('@user is not allowed to write messages.', array('@user' => $recipient3->name));
     $this->assertEqual($errormessage, $resultf2['messages']['error'][0], 'API denied to send message from user without permission');
-
   }
 
   /**
