Index: code/ai/ai_profiles.cpp
===================================================================
--- code/ai/ai_profiles.cpp	(revision 11169)
+++ code/ai/ai_profiles.cpp	(working copy)
@@ -463,6 +463,8 @@
 
 			set_flag(profile, "$fix ai path order bug:", AIPF2_FIX_AI_PATH_ORDER_BUG, AIP_FLAG2);
 
+			set_flag(profile, "$strict turret-tagged-only targeting:", AIPF2_STRICT_TURRET_TAGGED_ONLY_TARGETING, AIP_FLAG2);
+
 			// ----------
 
 			// compatibility
Index: code/ai/ai_profiles.h
===================================================================
--- code/ai/ai_profiles.h	(revision 11169)
+++ code/ai/ai_profiles.h	(working copy)
@@ -65,6 +65,7 @@
 #define AIPF2_ASPECT_LOCK_COUNTERMEASURE							(1 << 11)
 #define AIPF2_AI_GUARDS_SPECIFIC_SHIP_IN_WING						(1 << 12)
 #define AIPF2_FIX_AI_PATH_ORDER_BUG									(1 << 13)
+#define AIPF2_STRICT_TURRET_TAGGED_ONLY_TARGETING					(1 << 14)
 
 // AI Path types
 #define	AI_PATH_MODE_NORMAL 0
Index: code/ai/aiturret.cpp
===================================================================
--- code/ai/aiturret.cpp	(revision 11169)
+++ code/ai/aiturret.cpp	(working copy)
@@ -646,9 +646,15 @@
 			}
 		}
 
-		// check if	turret flagged to only target tagged ships
+		// check if turret flagged to only target tagged ships
+		// Note: retail behaviour was turrets with tagged-only could still fire at
+		// bombs, and could fire their spawn weapons
+		// this check is almost redundant; see the almost identical check in ai_fire_from_turret
+		// however if this is removed turrets still track any targets but don't fire at them
 		if (eeo->eeo_flags & EEOF_TAGGED_ONLY) {
-			if (!ship_is_tagged(objp)) {
+			if (!ship_is_tagged(objp) &&
+					( (The_mission.ai_profile->flags2 & AIPF2_STRICT_TURRET_TAGGED_ONLY_TARGETING) ||
+					( !(objp->type == OBJ_WEAPON) && !(turret_weapon_has_flags(&eeo->turret_subsys->weapons, WIF_SPAWN))) )) {
 				return;
 			}
 		}
@@ -2277,6 +2283,8 @@
 					}
 				}
 
+				bool tagged_only = ((wip->wi_flags2 & WIF2_TAGGED_ONLY) || (ss->weapons.flags & SW_FLAG_TAGGED_ONLY));
+
 				if (lep->type == OBJ_SHIP) {
 					// Check if we're targeting a protected ship
 					if (lep->flags & OF_PROTECTED) {
@@ -2309,14 +2317,16 @@
 						ss->turret_time_enemy_in_range = 0.0f;
 						continue;
 					}
+					// Check if weapon or turret is set to tagged-only
+					// must check here in case turret has multiple weapons and not all are tagged-only
+					else if (!ship_is_tagged(lep) && tagged_only) {
+						continue;
+					}
 				}
 				else
 				{
-					//can't tag anything else, other than asteroids
-					//but we don't want to waste this type of
-					//weaponary on asteroids now do we?
-					if ((wip->wi_flags2 & WIF2_TAGGED_ONLY) || (ss->weapons.flags & SW_FLAG_TAGGED_ONLY))
-					{
+					// check tagged-only for non-ship targets
+					if (tagged_only && (!(lep->type == OBJ_WEAPON) || (The_mission.ai_profile->flags2 & AIPF2_STRICT_TURRET_TAGGED_ONLY_TARGETING))) {
 						continue;
 					}
 				}
