diff --git a/topologies/replset.js b/topologies/replset.js
index <HASH>..<HASH> 100644
--- a/topologies/replset.js
+++ b/topologies/replset.js
@@ -1196,7 +1196,11 @@ function executeWriteOperation(args, options, callback) {
   }
 
   const willRetryWrite =
-    !args.retrying && options.retryWrites && options.session && isRetryableWritesSupported(self);
+    !args.retrying &&
+    options.retryWrites &&
+    options.session &&
+    isRetryableWritesSupported(self) &&
+    !options.session.inTransaction();
 
   if (!self.s.replicaSetState.hasPrimary()) {
     if (self.s.disconnectHandler) {
refactor(replset): don't retry writes if in a transaction